From facb3edec9fd275d5a8fcabaa87f768087255768 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 12 Dec 2025 02:34:07 +0100 Subject: chore! breaking API changes, rename project to Nectar, instead of NeCTI. Signed-off-by: Amlal El Mahrouss --- src/CommandLine/asm.cc | 95 ++++++++++++++++++++++ src/CommandLine/asm.json | 12 +++ src/CommandLine/cppdrv.cc | 23 ++++++ src/CommandLine/cppdrv.json | 12 +++ src/CommandLine/dbg.cc | 18 ++++ src/CommandLine/dbg.json | 12 +++ src/CommandLine/kdbg.cc | 18 ++++ src/CommandLine/kdbg.json | 12 +++ src/CommandLine/ld64.cc | 16 ++++ src/CommandLine/ld64.json | 12 +++ src/CommandLine/pef-amd64-cxxdrv.cc | 38 +++++++++ src/CommandLine/pef-amd64-cxxdrv.json | 19 +++++ src/CommandLine/pef-arm64-cdrv.cc | 38 +++++++++ src/CommandLine/pef-arm64-cdrv.json | 19 +++++ src/CompilerKit/ck-osx-san.json | 2 +- src/CompilerKit/ck-osx.json | 2 +- src/CompilerKit/ck-posix.json | 2 +- src/CompilerKit/src/Assemblers/Assembler+32x0.cc | 2 +- src/CompilerKit/src/Assemblers/Assembler+64x0.cc | 2 +- src/CompilerKit/src/Assemblers/Assembler+AMD64.cc | 2 +- src/CompilerKit/src/Assemblers/Assembler+ARM64.cc | 2 +- .../src/Assemblers/Assembler+PowerPC.cc | 2 +- .../src/CodeGenerator+AssemblyFactory.cc | 4 +- src/CompilerKit/src/Compilers/CCompiler+64x0.cc | 4 +- src/CompilerKit/src/Compilers/CCompiler+ARM64.cc | 4 +- src/CompilerKit/src/Compilers/CCompiler+Power64.cc | 4 +- .../src/Compilers/CPlusPlusCompiler+AMD64.cc | 20 ++--- .../src/DynamicLinkers/DynamicLinker64+PEF.cc | 8 +- .../src/Preprocessor/Preprocessor+Generic.cc | 4 +- src/DebuggerKit/dk-nekernel.json | 2 +- src/DebuggerKit/dk-osx.json | 2 +- src/DebuggerKit/src/NeKernelContract.cc | 2 +- src/DebuggerKit/src/NeKernelContractCLI.cc | 4 +- src/DebuggerKit/src/POSIXMachContractCLI.cc | 4 +- src/Tools/asm.cc | 95 ---------------------- src/Tools/asm.json | 12 --- src/Tools/cppdrv.cc | 23 ------ src/Tools/cppdrv.json | 12 --- src/Tools/dbg.cc | 18 ---- src/Tools/dbg.json | 12 --- src/Tools/kdbg.cc | 18 ---- src/Tools/kdbg.json | 12 --- src/Tools/ld64.cc | 16 ---- src/Tools/ld64.json | 12 --- src/Tools/pef-amd64-cxxdrv.cc | 38 --------- src/Tools/pef-amd64-cxxdrv.json | 19 ----- src/Tools/pef-arm64-cdrv.cc | 38 --------- src/Tools/pef-arm64-cdrv.json | 19 ----- 48 files changed, 383 insertions(+), 383 deletions(-) create mode 100644 src/CommandLine/asm.cc create mode 100644 src/CommandLine/asm.json create mode 100644 src/CommandLine/cppdrv.cc create mode 100644 src/CommandLine/cppdrv.json create mode 100644 src/CommandLine/dbg.cc create mode 100644 src/CommandLine/dbg.json create mode 100644 src/CommandLine/kdbg.cc create mode 100644 src/CommandLine/kdbg.json create mode 100644 src/CommandLine/ld64.cc create mode 100644 src/CommandLine/ld64.json create mode 100644 src/CommandLine/pef-amd64-cxxdrv.cc create mode 100644 src/CommandLine/pef-amd64-cxxdrv.json create mode 100644 src/CommandLine/pef-arm64-cdrv.cc create mode 100644 src/CommandLine/pef-arm64-cdrv.json delete mode 100644 src/Tools/asm.cc delete mode 100644 src/Tools/asm.json delete mode 100644 src/Tools/cppdrv.cc delete mode 100644 src/Tools/cppdrv.json delete mode 100644 src/Tools/dbg.cc delete mode 100644 src/Tools/dbg.json delete mode 100644 src/Tools/kdbg.cc delete mode 100644 src/Tools/kdbg.json delete mode 100644 src/Tools/ld64.cc delete mode 100644 src/Tools/ld64.json delete mode 100644 src/Tools/pef-amd64-cxxdrv.cc delete mode 100644 src/Tools/pef-amd64-cxxdrv.json delete mode 100644 src/Tools/pef-arm64-cdrv.cc delete mode 100644 src/Tools/pef-arm64-cdrv.json (limited to 'src') diff --git a/src/CommandLine/asm.cc b/src/CommandLine/asm.cc new file mode 100644 index 0000000..3773ff3 --- /dev/null +++ b/src/CommandLine/asm.cc @@ -0,0 +1,95 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +/// @file asm.cc +/// @brief Assembler frontend. + +#include +#include +#include + +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 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/CommandLine/asm.json b/src/CommandLine/asm.json new file mode 100644 index 0000000..bfb8ac7 --- /dev/null +++ b/src/CommandLine/asm.json @@ -0,0 +1,12 @@ +{ + "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/CommandLine/cppdrv.cc b/src/CommandLine/cppdrv.cc new file mode 100644 index 0000000..92bc5ae --- /dev/null +++ b/src/CommandLine/cppdrv.cc @@ -0,0 +1,23 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +/// @file cppdrv.cc +/// @brief Nectar frontend preprocessor. + +#include +#include + +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/CommandLine/cppdrv.json b/src/CommandLine/cppdrv.json new file mode 100644 index 0000000..9eb5e54 --- /dev/null +++ b/src/CommandLine/cppdrv.json @@ -0,0 +1,12 @@ +{ + "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/CommandLine/dbg.cc b/src/CommandLine/dbg.cc new file mode 100644 index 0000000..290b183 --- /dev/null +++ b/src/CommandLine/dbg.cc @@ -0,0 +1,18 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +#include + +/// @file dbg.cc +/// @brief Nectar 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/CommandLine/dbg.json b/src/CommandLine/dbg.json new file mode 100644 index 0000000..8e786a7 --- /dev/null +++ b/src/CommandLine/dbg.json @@ -0,0 +1,12 @@ +{ + "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/CommandLine/kdbg.cc b/src/CommandLine/kdbg.cc new file mode 100644 index 0000000..3a6eaa3 --- /dev/null +++ b/src/CommandLine/kdbg.cc @@ -0,0 +1,18 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +#include + +/// @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/CommandLine/kdbg.json b/src/CommandLine/kdbg.json new file mode 100644 index 0000000..f661fc5 --- /dev/null +++ b/src/CommandLine/kdbg.json @@ -0,0 +1,12 @@ +{ + "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/CommandLine/ld64.cc b/src/CommandLine/ld64.cc new file mode 100644 index 0000000..618bd32 --- /dev/null +++ b/src/CommandLine/ld64.cc @@ -0,0 +1,16 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +#include + +/// @file ld64.cc +/// @brief Nectar 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/CommandLine/ld64.json b/src/CommandLine/ld64.json new file mode 100644 index 0000000..2045550 --- /dev/null +++ b/src/CommandLine/ld64.json @@ -0,0 +1,12 @@ +{ + "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/CommandLine/pef-amd64-cxxdrv.cc b/src/CommandLine/pef-amd64-cxxdrv.cc new file mode 100644 index 0000000..1bd7c3c --- /dev/null +++ b/src/CommandLine/pef-amd64-cxxdrv.cc @@ -0,0 +1,38 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +/// @file pef-amd64-cxxdrv.cc +/// @brief Nectar C++ frontend compiler for AMD64. + +#include +#include +#include +#include + +#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(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/CommandLine/pef-amd64-cxxdrv.json b/src/CommandLine/pef-amd64-cxxdrv.json new file mode 100644 index 0000000..62b5b4d --- /dev/null +++ b/src/CommandLine/pef-amd64-cxxdrv.json @@ -0,0 +1,19 @@ +{ + "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/CommandLine/pef-arm64-cdrv.cc b/src/CommandLine/pef-arm64-cdrv.cc new file mode 100644 index 0000000..f4be5d0 --- /dev/null +++ b/src/CommandLine/pef-arm64-cdrv.cc @@ -0,0 +1,38 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +/// @file pef-arm-cdrv.cc +/// @brief Nectar ARm64 C frontend compiler. + +#include +#include +#include +#include + +#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(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/CommandLine/pef-arm64-cdrv.json b/src/CommandLine/pef-arm64-cdrv.json new file mode 100644 index 0000000..be6a1be --- /dev/null +++ b/src/CommandLine/pef-arm64-cdrv.json @@ -0,0 +1,19 @@ +{ + "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 diff --git a/src/CompilerKit/ck-osx-san.json b/src/CompilerKit/ck-osx-san.json index 193b3a2..137596f 100644 --- a/src/CompilerKit/ck-osx-san.json +++ b/src/CompilerKit/ck-osx-san.json @@ -23,7 +23,7 @@ "-fsanitize=undefined" ], "cpp_macros": [ - "__NECTI__=202505", + "__NECTAR__=202505", "CK_USE_STRUCTS=1", "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" ] diff --git a/src/CompilerKit/ck-osx.json b/src/CompilerKit/ck-osx.json index 1109f75..392140a 100644 --- a/src/CompilerKit/ck-osx.json +++ b/src/CompilerKit/ck-osx.json @@ -18,7 +18,7 @@ "-shared" ], "cpp_macros": [ - "__NECTI__=202505", + "__NECTAR__=202505", "CK_USE_STRUCTS=1", "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" ] diff --git a/src/CompilerKit/ck-posix.json b/src/CompilerKit/ck-posix.json index 3f6127c..6380ae2 100644 --- a/src/CompilerKit/ck-posix.json +++ b/src/CompilerKit/ck-posix.json @@ -17,7 +17,7 @@ "-shared" ], "cpp_macros": [ - "__NECTI__=202505", + "__NECTAR__=202505", "CK_USE_STRUCTS=1", "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" ] diff --git a/src/CompilerKit/src/Assemblers/Assembler+32x0.cc b/src/CompilerKit/src/Assemblers/Assembler+32x0.cc index 1b8d9f6..dbf2898 100644 --- a/src/CompilerKit/src/Assemblers/Assembler+32x0.cc +++ b/src/CompilerKit/src/Assemblers/Assembler+32x0.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/src/CompilerKit/src/Assemblers/Assembler+64x0.cc b/src/CompilerKit/src/Assemblers/Assembler+64x0.cc index 757f5b4..1ddb5d2 100644 --- a/src/CompilerKit/src/Assemblers/Assembler+64x0.cc +++ b/src/CompilerKit/src/Assemblers/Assembler+64x0.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/src/CompilerKit/src/Assemblers/Assembler+AMD64.cc b/src/CompilerKit/src/Assemblers/Assembler+AMD64.cc index 7146a53..6d1ca0e 100644 --- a/src/CompilerKit/src/Assemblers/Assembler+AMD64.cc +++ b/src/CompilerKit/src/Assemblers/Assembler+AMD64.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/src/CompilerKit/src/Assemblers/Assembler+ARM64.cc b/src/CompilerKit/src/Assemblers/Assembler+ARM64.cc index 5113704..3df2b03 100644 --- a/src/CompilerKit/src/Assemblers/Assembler+ARM64.cc +++ b/src/CompilerKit/src/Assemblers/Assembler+ARM64.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc b/src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc index bad9535..d595731 100644 --- a/src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc +++ b/src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cc b/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cc index b5da2a8..c132638 100644 --- a/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cc +++ b/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ @@ -9,7 +9,7 @@ /** * @file AssemblyFactory.cc * @author Amlal El Mahrouss (amlal@nekernel.org) - * @brief Assembly API of NeCTI + * @brief Assembly API of Nectar * @version 0.0.3 * @copyright Copyright (c) 2024-2025 Amlal El Mahrouss * diff --git a/src/CompilerKit/src/Compilers/CCompiler+64x0.cc b/src/CompilerKit/src/Compilers/CCompiler+64x0.cc index f18b22b..42d654b 100644 --- a/src/CompilerKit/src/Compilers/CCompiler+64x0.cc +++ b/src/CompilerKit/src/Compilers/CCompiler+64x0.cc @@ -2,7 +2,7 @@ * ======================================================== * * cc - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ @@ -321,7 +321,7 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontend64x0::Compile(std::strin if (expr.find(")") != std::string::npos) expr.erase(expr.find(")")); - kIfFunction = "__NECTI_IF_PROC_"; + kIfFunction = "__NECTAR_IF_PROC_"; kIfFunction += std::to_string(time_off._Raw); syntaxLeaf.fUserValue = "\tlda r12, extern_segment "; diff --git a/src/CompilerKit/src/Compilers/CCompiler+ARM64.cc b/src/CompilerKit/src/Compilers/CCompiler+ARM64.cc index e0f08e2..688835e 100644 --- a/src/CompilerKit/src/Compilers/CCompiler+ARM64.cc +++ b/src/CompilerKit/src/Compilers/CCompiler+ARM64.cc @@ -2,7 +2,7 @@ * ======================================================== * * CCompilerARM64 - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ @@ -320,7 +320,7 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendARM64::Compile(std::stri if (expr.find(")") != std::string::npos) expr.erase(expr.find(")")); - kIfFunction = "__NECTI_IF_PROC_"; + kIfFunction = "__NECTAR_IF_PROC_"; kIfFunction += std::to_string(time_off._Raw); syntaxLeaf.fUserValue = "\tlda r12, extern_segment "; diff --git a/src/CompilerKit/src/Compilers/CCompiler+Power64.cc b/src/CompilerKit/src/Compilers/CCompiler+Power64.cc index 724e7cc..3867be6 100644 --- a/src/CompilerKit/src/Compilers/CCompiler+Power64.cc +++ b/src/CompilerKit/src/Compilers/CCompiler+Power64.cc @@ -2,7 +2,7 @@ * ======================================================== * * CompilerPower64 - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ @@ -321,7 +321,7 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendPower64::Compile(std::st if (expr.find(")") != std::string::npos) expr.erase(expr.find(")")); - kIfFunction = "__NECTI_IF_PROC_"; + kIfFunction = "__NECTAR_IF_PROC_"; kIfFunction += std::to_string(time_off._Raw); syntax_leaf.fUserValue = diff --git a/src/CompilerKit/src/Compilers/CPlusPlusCompiler+AMD64.cc b/src/CompilerKit/src/Compilers/CPlusPlusCompiler+AMD64.cc index 70de909..54fbc25 100644 --- a/src/CompilerKit/src/Compilers/CPlusPlusCompiler+AMD64.cc +++ b/src/CompilerKit/src/Compilers/CPlusPlusCompiler+AMD64.cc @@ -2,7 +2,7 @@ * ======================================================== * * C++ Compiler Driver - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ @@ -345,10 +345,10 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendCPlusPlusAMD64::Compile( symbol_name_fn.erase(symbol_name_fn.find("(")); } - syntax_tree.fUserValue = "public_segment .code64 __NECTI_" + symbol_name_fn + "\n"; + syntax_tree.fUserValue = "public_segment .code64 __NECTAR_" + symbol_name_fn + "\n"; ++kFunctionEmbedLevel; - kOriginMap.push_back({"__NECTI_" + symbol_name_fn, kOrigin}); + kOriginMap.push_back({"__NECTAR_" + symbol_name_fn, kOrigin}); break; @@ -474,10 +474,10 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendCPlusPlusAMD64::Compile( if (pairRight != valueOfVar) { if (valueOfVar[0] == '\"') { - syntax_tree.fUserValue = "segment .data64 __NECTI_LOCAL_VAR_" + varName + ": db " + + syntax_tree.fUserValue = "segment .data64 __NECTAR_LOCAL_VAR_" + varName + ": db " + valueOfVar + ", 0\n\n"; syntax_tree.fUserValue += instr + kRegisterList[kRegisterMap.size() - 1] + ", " + - "__NECTI_LOCAL_VAR_" + varName + "\n"; + "__NECTAR_LOCAL_VAR_" + varName + "\n"; kOrigin += 1UL; } else { syntax_tree.fUserValue = @@ -492,16 +492,16 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendCPlusPlusAMD64::Compile( if (((int) indexRight - 1) < 0) { if (valueOfVar[0] == '\"') { syntax_tree.fUserValue = - "segment .data64 __NECTI_LOCAL_VAR_" + varName + ": db " + valueOfVar + ", 0\n"; + "segment .data64 __NECTAR_LOCAL_VAR_" + varName + ": db " + valueOfVar + ", 0\n"; syntax_tree.fUserValue += instr + kRegisterList[kRegisterMap.size()] + ", " + - "__NECTI_LOCAL_VAR_" + varName + "\n"; + "__NECTAR_LOCAL_VAR_" + varName + "\n"; kOrigin += 1UL; } else { auto mangled = valueOfVar; if (mangled.find("(") != std::string::npos) { auto ret = mangled.erase(mangled.find("(")); - mangled = "__NECTI_"; + mangled = "__NECTAR_"; mangled += ret; syntax_tree.fUserValue = "jmp " + mangled + "\n"; @@ -660,8 +660,8 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendCPlusPlusAMD64::Compile( break; } } else { - syntax_tree.fUserValue = "__NECTI_LOCAL_RETURN_STRING: db " + subText + - ", 0\nmov rcx, __NECTI_LOCAL_RETURN_STRING\n"; + syntax_tree.fUserValue = "__NECTAR_LOCAL_RETURN_STRING: db " + subText + + ", 0\nmov rcx, __NECTAR_LOCAL_RETURN_STRING\n"; syntax_tree.fUserValue += "mov rax, rcx\nret\n"; kOrigin += 1UL; diff --git a/src/CompilerKit/src/DynamicLinkers/DynamicLinker64+PEF.cc b/src/CompilerKit/src/DynamicLinkers/DynamicLinker64+PEF.cc index 0361873..f3eaaa9 100644 --- a/src/CompilerKit/src/DynamicLinkers/DynamicLinker64+PEF.cc +++ b/src/CompilerKit/src/DynamicLinkers/DynamicLinker64+PEF.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license @file DynamicLinker64PEF.cc @brief: C++ 64-Bit PEF Linker for NeKernel.org's NeKernel @@ -22,7 +22,7 @@ #include #include -#define kLinkerVersionStr "NeCTI 64-Bit Linker (Preferred Executable Format)" +#define kLinkerVersionStr "Nectar 64-Bit Linker (Preferred Executable Format)" #define kPefNoCpu (0U) #define kPefNoSubCpu (0U) @@ -68,8 +68,8 @@ static CompilerKit::STLString kLinkerStart = kPefStart; static std::vector kObjectList; static std::vector kObjectBytes; -/// @brief NeCTI 64-bit Linker. -/// @note This linker is made for PEF executable, thus NeCTI based OSes. +/// @brief Nectar 64-bit Linker. +/// @note This linker is made for PEF executable, thus Nectar based OSes. NECTI_MODULE(DynamicLinker64PEF) { bool is_executable = true; diff --git a/src/CompilerKit/src/Preprocessor/Preprocessor+Generic.cc b/src/CompilerKit/src/Preprocessor/Preprocessor+Generic.cc index 4e34ab3..97bf44f 100644 --- a/src/CompilerKit/src/Preprocessor/Preprocessor+Generic.cc +++ b/src/CompilerKit/src/Preprocessor/Preprocessor+Generic.cc @@ -2,7 +2,7 @@ * ======================================================== * * C++ Preprocessor Driver - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ @@ -760,7 +760,7 @@ NECTI_MODULE(CPlusPlusPreprocessorMain) { Detail::bpp_macro macro_zka; - macro_zka.fName = "__NECTI__"; + macro_zka.fName = "__NECTAR__"; macro_zka.fValue = "1"; kMacros.push_back(macro_zka); diff --git a/src/DebuggerKit/dk-nekernel.json b/src/DebuggerKit/dk-nekernel.json index ad2deb8..4483a30 100644 --- a/src/DebuggerKit/dk-nekernel.json +++ b/src/DebuggerKit/dk-nekernel.json @@ -9,7 +9,7 @@ "output_name": "/usr/local/lib/libDebuggerKit.dylib", "compiler_flags": ["-fPIC", "-shared"], "cpp_macros": [ - "__NECTI__=202505", + "__NECTAR__=202505", "DK_USE_STRUCTS=1", "DK_NEKERNEL_DEBUGGER", "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" diff --git a/src/DebuggerKit/dk-osx.json b/src/DebuggerKit/dk-osx.json index 20813aa..677e473 100644 --- a/src/DebuggerKit/dk-osx.json +++ b/src/DebuggerKit/dk-osx.json @@ -9,7 +9,7 @@ "output_name": "/usr/local/lib/libDebuggerKit.dylib", "compiler_flags": ["-fPIC", "-shared"], "cpp_macros": [ - "__NECTI__=202505", + "__NECTAR__=202505", "CK_USE_STRUCTS=1", "DEBUGGERKIT_POSIX", "DK_MACH_DEBUGGER", diff --git a/src/DebuggerKit/src/NeKernelContract.cc b/src/DebuggerKit/src/NeKernelContract.cc index 58d1295..b4b3b9d 100644 --- a/src/DebuggerKit/src/NeKernelContract.cc +++ b/src/DebuggerKit/src/NeKernelContract.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/src/DebuggerKit/src/NeKernelContractCLI.cc b/src/DebuggerKit/src/NeKernelContractCLI.cc index 3079568..3f05bed 100644 --- a/src/DebuggerKit/src/NeKernelContractCLI.cc +++ b/src/DebuggerKit/src/NeKernelContractCLI.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ @@ -29,7 +29,7 @@ static void dbgi_ctrlc_handler(std::int32_t _) { NECTI_MODULE(DebuggerNeKernel) { pfd::notify("Debugger Event", - "NeCTI Debugger\n(C) 2025 Amlal El Mahrouss and NeKernel.org contributors, all " + "Nectar Debugger\n(C) 2025 Amlal El Mahrouss and NeKernel.org contributors, all " "rights reserved."); if (argc >= 5 && std::string(argv[1]) == "-k" && argv[2] != nullptr && diff --git a/src/DebuggerKit/src/POSIXMachContractCLI.cc b/src/DebuggerKit/src/POSIXMachContractCLI.cc index 9093ec2..041a243 100644 --- a/src/DebuggerKit/src/POSIXMachContractCLI.cc +++ b/src/DebuggerKit/src/POSIXMachContractCLI.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ @@ -30,7 +30,7 @@ static void dbgi_ctrlc_handler(std::int32_t _) { NECTI_MODULE(DebuggerMachPOSIX) { pfd::notify( "Debugger Event", - "Userland Debugger\n(C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license."); + "Userland Debugger\n(C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license."); if (argc >= 3 && std::string(argv[1]) == "-p" && argv[2] != nullptr) { kPath = argv[2]; 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 -#include -#include - -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 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 -#include - -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 - -/// @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 - -/// @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 - -/// @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 -#include -#include -#include - -#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(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 -#include -#include -#include - -#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(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 -- cgit v1.2.3