summaryrefslogtreecommitdiffhomepage
path: root/src/Tools
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-12 02:34:07 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-12 02:37:30 +0100
commitfacb3edec9fd275d5a8fcabaa87f768087255768 (patch)
tree587c1fdd1e4b09a3c0f5243af46f7d09ac3722fd /src/Tools
parent37b8e34dc54f572fbfbd135742fa11c21c5e67c1 (diff)
chore! breaking API changes, rename project to Nectar, instead of NeCTI.v0.0.9
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/Tools')
-rw-r--r--src/Tools/asm.cc95
-rw-r--r--src/Tools/asm.json12
-rw-r--r--src/Tools/cppdrv.cc23
-rw-r--r--src/Tools/cppdrv.json12
-rw-r--r--src/Tools/dbg.cc18
-rw-r--r--src/Tools/dbg.json12
-rw-r--r--src/Tools/kdbg.cc18
-rw-r--r--src/Tools/kdbg.json12
-rw-r--r--src/Tools/ld64.cc16
-rw-r--r--src/Tools/ld64.json12
-rw-r--r--src/Tools/pef-amd64-cxxdrv.cc38
-rw-r--r--src/Tools/pef-amd64-cxxdrv.json19
-rw-r--r--src/Tools/pef-arm64-cdrv.cc38
-rw-r--r--src/Tools/pef-arm64-cdrv.json19
14 files changed, 0 insertions, 344 deletions
diff --git a/src/Tools/asm.cc b/src/Tools/asm.cc
deleted file mode 100644
index 90b104c..0000000
--- a/src/Tools/asm.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license
-
-======================================== */
-
-/// @file asm.cc
-/// @brief Assembler frontend.
-
-#include <CompilerKit/Detail/Config.h>
-#include <cstring>
-#include <vector>
-
-CK_IMPORT_C Int32 AssemblerMainPower64(Int32 argc, Char const* argv[]);
-CK_IMPORT_C Int32 AssemblerMainARM64(Int32 argc, Char const* argv[]);
-CK_IMPORT_C Int32 AssemblerMain64x0(Int32 argc, Char const* argv[]);
-CK_IMPORT_C Int32 AssemblerMainAMD64(Int32 argc, Char const* argv[]);
-
-enum AsmKind : Int32 {
- kInvalidAssembler = 0,
- kX64Assembler = 100,
- k64X0Assembler,
- kPOWER64Assembler,
- kARM64Assembler,
- kAssemblerCount = kARM64Assembler - kX64Assembler + 1,
-};
-
-Int32 main(Int32 argc, Char const* argv[]) {
- std::vector<const Char*> arg_vec_cstr;
- arg_vec_cstr.push_back(argv[0]);
-
- const Int32 kInvalidAssembler = -1;
- Int32 asm_type = kInvalidAssembler;
-
- for (size_t index_arg = 1; index_arg < argc; ++index_arg) {
- if (strcmp(argv[index_arg], "-asm-h") == 0) {
- std::printf("asm: Frontend Assembler (64x0, power64, arm64, x64).\n");
- std::printf("asm: Version: %s, Release: %s.\n", kDistVersion, kDistRelease);
- std::printf(
- "asm: Designed by Amlal El Mahrouss, Copyright (C) 2024-2025 Amlal El Mahrouss, all "
- "rights reserved.\n");
- std::printf(
- "CompilerKit: Designed by Amlal El Mahrouss, Copyright (C) 2024-2025 Amlal El Mahrouss, "
- "Licensed under the Apache 2.0 license.\n");
-
- return 0;
- } else if (strcmp(argv[index_arg], "-asm-x64") == 0) {
- asm_type = kX64Assembler;
- } else if (strcmp(argv[index_arg], "-asm-aarch64") == 0) {
- asm_type = kARM64Assembler;
- } else if (strcmp(argv[index_arg], "-asm-64x0") == 0) {
- asm_type = k64X0Assembler;
- } else if (strcmp(argv[index_arg], "-asm-power64") == 0) {
- asm_type = kPOWER64Assembler;
- } else {
- arg_vec_cstr.push_back(argv[index_arg]);
- }
- }
-
- switch (asm_type) {
- case kPOWER64Assembler: {
- if (int32_t code = AssemblerMainPower64(arg_vec_cstr.size(), arg_vec_cstr.data()); code) {
- std::printf("asm: frontend exited with code %i.\n", code);
- return code;
- }
- break;
- }
- case k64X0Assembler: {
- if (int32_t code = AssemblerMain64x0(arg_vec_cstr.size(), arg_vec_cstr.data()); code) {
- std::printf("asm: frontend exited with code %i.\n", code);
- return code;
- }
- break;
- }
- case kARM64Assembler: {
- if (int32_t code = AssemblerMainARM64(arg_vec_cstr.size(), arg_vec_cstr.data()); code) {
- std::printf("asm: frontend exited with code %i.\n", code);
- return code;
- }
- break;
- }
- case kX64Assembler: {
- if (int32_t code = AssemblerMainAMD64(arg_vec_cstr.size(), arg_vec_cstr.data()); code) {
- std::printf("asm: frontend exited with code %i.\n", code);
- return code;
- }
- break;
- }
- default: {
- return EXIT_FAILURE;
- }
- }
-
- return EXIT_SUCCESS;
-}
diff --git a/src/Tools/asm.json b/src/Tools/asm.json
deleted file mode 100644
index bfb8ac7..0000000
--- a/src/Tools/asm.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "compiler_path": "clang++",
- "compiler_std": "c++20",
- "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"],
- "sources_path": ["asm.cc"],
- "output_name": "asm",
- "compiler_flags": ["-L/usr/lib", "-lCompilerKit"],
- "cpp_macros": [
- "__ASM__=202401",
- "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)"
- ]
-}
diff --git a/src/Tools/cppdrv.cc b/src/Tools/cppdrv.cc
deleted file mode 100644
index 95d4c3a..0000000
--- a/src/Tools/cppdrv.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license
-
-======================================== */
-
-/// @file cppdrv.cc
-/// @brief NeCTI frontend preprocessor.
-
-#include <CompilerKit/Detail/Config.h>
-#include <CompilerKit/ErrorID.h>
-
-CK_IMPORT_C int CPlusPlusPreprocessorMain(int argc, char const* argv[]);
-
-int main(int argc, char const* argv[]) {
- if (auto code = CPlusPlusPreprocessorMain(argc, argv); code > 0) {
- std::printf("cppdrv: preprocessor exited with code %i.\n", code);
-
- return NECTI_EXEC_ERROR;
- }
-
- return NECTI_SUCCESS;
-}
diff --git a/src/Tools/cppdrv.json b/src/Tools/cppdrv.json
deleted file mode 100644
index 9eb5e54..0000000
--- a/src/Tools/cppdrv.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "compiler_path": "clang++",
- "compiler_std": "c++20",
- "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"],
- "sources_path": ["cppdrv.cc"],
- "output_name": "cppdrv",
- "compiler_flags": ["-L/usr/local/lib", "-lCompilerKit"],
- "cpp_macros": [
- "__CPPDRV__=202504",
- "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)"
- ]
-}
diff --git a/src/Tools/dbg.cc b/src/Tools/dbg.cc
deleted file mode 100644
index b8c4932..0000000
--- a/src/Tools/dbg.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license
-
-======================================== */
-
-#include <CompilerKit/Detail/Config.h>
-
-/// @file dbg.cc
-/// @brief NeCTI debugger.
-
-CK_IMPORT_C Int32 DebuggerMachPOSIX(Int32 argc, Char const* argv[]);
-
-/// @brief Debugger entrypoint.
-/// @return Status code of debugger.
-Int32 main(Int32 argc, Char const* argv[]) {
- return DebuggerMachPOSIX(argc, argv);
-}
diff --git a/src/Tools/dbg.json b/src/Tools/dbg.json
deleted file mode 100644
index 8e786a7..0000000
--- a/src/Tools/dbg.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "compiler_path": "clang++",
- "compiler_std": "c++20",
- "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"],
- "sources_path": ["dbg.cc"],
- "output_name": "dbg",
- "compiler_flags": ["-L/usr/lib", "-lDebuggerKit"],
- "cpp_macros": [
- "__DBG__=202401",
- "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)"
- ]
-}
diff --git a/src/Tools/kdbg.cc b/src/Tools/kdbg.cc
deleted file mode 100644
index ca82002..0000000
--- a/src/Tools/kdbg.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license
-
-======================================== */
-
-#include <CompilerKit/Detail/Config.h>
-
-/// @file kdbg.cc
-/// @brief NeKernel debugger.
-
-CK_IMPORT_C Int32 DebuggerNeKernel(Int32 argc, Char const* argv[]);
-
-/// @brief Debugger entrypoint.
-/// @return Status code of debugger.
-Int32 main(Int32 argc, Char const* argv[]) {
- return DebuggerNeKernel(argc, argv);
-}
diff --git a/src/Tools/kdbg.json b/src/Tools/kdbg.json
deleted file mode 100644
index f661fc5..0000000
--- a/src/Tools/kdbg.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "compiler_path": "clang++",
- "compiler_std": "c++20",
- "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"],
- "sources_path": ["kdbg.cc"],
- "output_name": "kdbg",
- "compiler_flags": ["-L/usr/lib", "-lDebuggerKit"],
- "cpp_macros": [
- "__DBG__=202401",
- "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)"
- ]
-}
diff --git a/src/Tools/ld64.cc b/src/Tools/ld64.cc
deleted file mode 100644
index a2ce544..0000000
--- a/src/Tools/ld64.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license
-
-======================================== */
-
-#include <CompilerKit/Detail/Config.h>
-
-/// @file ld64.cc
-/// @brief NeCTI linker for AE objects.
-
-CK_IMPORT_C Int32 DynamicLinker64PEF(Int32 argc, Char const* argv[]);
-
-Int32 main(Int32 argc, Char const* argv[]) {
- return DynamicLinker64PEF(argc, argv);
-}
diff --git a/src/Tools/ld64.json b/src/Tools/ld64.json
deleted file mode 100644
index 2045550..0000000
--- a/src/Tools/ld64.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "compiler_path": "clang++",
- "compiler_std": "c++20",
- "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"],
- "sources_path": ["ld64.cc"],
- "output_name": "ld64",
- "compiler_flags": ["-L/usr/lib", "-lCompilerKit"],
- "cpp_macros": [
- "__LD64__=202401",
- "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)"
- ]
-}
diff --git a/src/Tools/pef-amd64-cxxdrv.cc b/src/Tools/pef-amd64-cxxdrv.cc
deleted file mode 100644
index 7abda83..0000000
--- a/src/Tools/pef-amd64-cxxdrv.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license
-
-======================================== */
-
-/// @file pef-amd64-cxxdrv.cc
-/// @brief NeCTI C++ frontend compiler for AMD64.
-
-#include <CompilerKit/Detail/Config.h>
-#include <CompilerKit/ErrorID.h>
-#include <CompilerKit/Utilities/Compiler.h>
-#include <CompilerKit/Utilities/DLL.h>
-
-#ifdef __APPLE__
-static auto kPath = "/usr/local/lib/libCompilerKit.dylib";
-#else
-static auto kPath = "/usr/lib/libCompilerKit.so";
-#endif
-
-static auto kSymbol = "CompilerCPlusPlusAMD64";
-
-Int32 main(Int32 argc, Char const* argv[]) {
- CompilerKit::DLLLoader dylib;
- dylib(kPath, kSymbol);
-
- CompilerKit::DLLLoader::EntryT entrypoint_cxx =
- reinterpret_cast<CompilerKit::DLLLoader::EntryT>(dylib.fEntrypoint);
-
- if (!entrypoint_cxx) {
- kStdOut;
- std::printf("error: Could not find entrypoint in %s: %s\n", kPath, dlerror());
-
- return EXIT_FAILURE;
- }
-
- return (entrypoint_cxx(argc, argv) == NECTI_SUCCESS) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
diff --git a/src/Tools/pef-amd64-cxxdrv.json b/src/Tools/pef-amd64-cxxdrv.json
deleted file mode 100644
index 62b5b4d..0000000
--- a/src/Tools/pef-amd64-cxxdrv.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "compiler_path": "clang++",
- "compiler_std": "c++20",
- "headers_path": [
- "../CompilerKit",
- "../",
- "../CompilerKit/src/Detail"
- ],
- "sources_path": [
- "pef-amd64-cxxdrv.cc"
- ],
- "output_name": "pef-amd64-cxxdrv",
- "compiler_flags": [
- ],
- "cpp_macros": [
- "__CXXDRV__=202504",
- "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)"
- ]
-} \ No newline at end of file
diff --git a/src/Tools/pef-arm64-cdrv.cc b/src/Tools/pef-arm64-cdrv.cc
deleted file mode 100644
index 3fba1ef..0000000
--- a/src/Tools/pef-arm64-cdrv.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-/* ========================================
-
- Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license
-
-======================================== */
-
-/// @file pef-arm-cdrv.cc
-/// @brief NeCTI ARm64 C frontend compiler.
-
-#include <CompilerKit/Detail/Config.h>
-#include <CompilerKit/ErrorID.h>
-#include <CompilerKit/Utilities/Compiler.h>
-#include <CompilerKit/Utilities/DLL.h>
-
-#ifdef __APPLE__
-static auto kPath = "/usr/local/lib/libCompilerKit.dylib";
-#else
-static auto kPath = "/usr/lib/libCompilerKit.so";
-#endif
-
-static auto kSymbol = "CompilerCLangARM64";
-
-Int32 main(Int32 argc, Char const* argv[]) {
- CompilerKit::DLLLoader dylib;
- dylib(kPath, kSymbol);
-
- CompilerKit::DLLLoader::EntryT entrypoint_c =
- reinterpret_cast<CompilerKit::DLLLoader::EntryT>(dylib.fEntrypoint);
-
- if (!entrypoint_c) {
- kStdOut;
- std::printf("error: Could not find entrypoint in %s: %s\n", kPath, dlerror());
-
- return EXIT_FAILURE;
- }
-
- return (entrypoint_c(argc, argv) == NECTI_SUCCESS) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
diff --git a/src/Tools/pef-arm64-cdrv.json b/src/Tools/pef-arm64-cdrv.json
deleted file mode 100644
index be6a1be..0000000
--- a/src/Tools/pef-arm64-cdrv.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "compiler_path": "clang++",
- "compiler_std": "c++20",
- "headers_path": [
- "../CompilerKit",
- "../",
- "../CompilerKit/src/Detail"
- ],
- "sources_path": [
- "pef-arm64-cdrv.cc"
- ],
- "output_name": "pef-arm64-cdrv",
- "compiler_flags": [
- ],
- "cpp_macros": [
- "__CXXDRV__=202504",
- "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)"
- ]
-} \ No newline at end of file