diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-16 22:54:33 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-16 22:54:33 +0100 |
| commit | 112b49ab7d2af6edea6bad97f2eea98e96ed5428 (patch) | |
| tree | 80e7590c4851efafa6813f6f6adf483b1d5180de /src/CommandLine | |
| parent | d4d91d5ffe7b02478a5ed14adcdad931dec95fd1 (diff) | |
feat: implement Mach-O linker and massive improvements on Assembler and Linkers.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/CommandLine')
| -rw-r--r-- | src/CommandLine/ld64-osx.json | 13 | ||||
| -rw-r--r-- | src/CommandLine/ld64-posix.json (renamed from src/CommandLine/ld64.json) | 2 | ||||
| -rw-r--r-- | src/CommandLine/mld64-osx.json | 13 | ||||
| -rw-r--r-- | src/CommandLine/mld64-posix.json | 13 | ||||
| -rw-r--r-- | src/CommandLine/mld64.cc | 15 |
5 files changed, 55 insertions, 1 deletions
diff --git a/src/CommandLine/ld64-osx.json b/src/CommandLine/ld64-osx.json new file mode 100644 index 0000000..1a78748 --- /dev/null +++ b/src/CommandLine/ld64-osx.json @@ -0,0 +1,13 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": ["../../include/CompilerKit", "../../include/", "../../include/CompilerKit/src/Detail"], + "sources_path": ["ld64.cc"], + "output_name": "ld64", + "compiler_flags": ["-L/usr/local/lib", "-lCompilerKit"], + "cpp_macros": [ + "__LD64__=202601", + "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" + ] +} + diff --git a/src/CommandLine/ld64.json b/src/CommandLine/ld64-posix.json index dff0720..d2e626b 100644 --- a/src/CommandLine/ld64.json +++ b/src/CommandLine/ld64-posix.json @@ -6,7 +6,7 @@ "output_name": "ld64", "compiler_flags": ["-L/usr/lib", "-lCompilerKit"], "cpp_macros": [ - "__LD64__=202401", + "__LD64__=202601", "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" ] } diff --git a/src/CommandLine/mld64-osx.json b/src/CommandLine/mld64-osx.json new file mode 100644 index 0000000..78b7d3a --- /dev/null +++ b/src/CommandLine/mld64-osx.json @@ -0,0 +1,13 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": ["../../include/CompilerKit", "../../include/", "../../include/CompilerKit/src/Detail"], + "sources_path": ["mld64.cc"], + "output_name": "mld64", + "compiler_flags": ["-L/usr/local/lib", "-lCompilerKit"], + "cpp_macros": [ + "__MLD64__=202601", + "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" + ] +} + diff --git a/src/CommandLine/mld64-posix.json b/src/CommandLine/mld64-posix.json new file mode 100644 index 0000000..0b8deab --- /dev/null +++ b/src/CommandLine/mld64-posix.json @@ -0,0 +1,13 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": ["../../include/CompilerKit", "../../include/", "../../include/CompilerKit/src/Detail"], + "sources_path": ["mld64.cc"], + "output_name": "mld64", + "compiler_flags": ["-L/usr/lib", "-lCompilerKit"], + "cpp_macros": [ + "__MLD64__=202601", + "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" + ] +} + diff --git a/src/CommandLine/mld64.cc b/src/CommandLine/mld64.cc new file mode 100644 index 0000000..f19712b --- /dev/null +++ b/src/CommandLine/mld64.cc @@ -0,0 +1,15 @@ +// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (See accompanying +// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0) +// Official repository: https://github.com/nekernel-org/nectar + +#include <CompilerKit/Detail/Config.h> + +/// @file ld64.cc +/// @brief Nectar linker for AE objects. + +CK_IMPORT_C Int32 DynamicLinker64MachO(Int32 argc, Char const* argv[]); + +Int32 main(Int32 argc, Char const* argv[]) { + return DynamicLinker64MachO(argc, argv); +} |
