sync ports with The Matrix

This commit is contained in:
purplerain 2023-09-14 00:49:35 +00:00
parent 9d4d2e721a
commit 79bc6d9d97
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
846 changed files with 10693 additions and 8131 deletions

View file

@ -4,11 +4,35 @@ internals.
Index: lld/CMakeLists.txt
--- lld/CMakeLists.txt.orig
+++ lld/CMakeLists.txt
@@ -206,7 +206,6 @@ endif()
@@ -155,6 +155,20 @@ list (APPEND CMAKE_MODULE_PATH "${LLD_SOURCE_DIR}/cmak
include(AddLLD)
+option(LLD_ENABLE_WASM
+ "Enable support for WASM."
+ OFF)
+if (LLD_ENABLE_WASM)
+ add_definitions("-DLLD_ENABLE_WASM=1")
+endif()
+
+option(LLD_ENABLE_MACHO
+ "Enable support for MachO."
+ OFF)
+if (LLD_ENABLE_MACHO)
+ add_definitions("-DLLD_ENABLE_MACHO=1")
+endif()
+
option(LLD_USE_VTUNE
"Enable VTune user task tracking."
OFF)
@@ -206,7 +220,9 @@ endif()
add_subdirectory(docs)
add_subdirectory(COFF)
add_subdirectory(ELF)
-add_subdirectory(MachO)
+if (LLD_ENABLE_MACHO)
+ add_subdirectory(MachO)
+endif()
add_subdirectory(MinGW)
add_subdirectory(wasm)

View file

@ -4,7 +4,7 @@ internals.
Index: lld/tools/lld/CMakeLists.txt
--- lld/tools/lld/CMakeLists.txt.orig
+++ lld/tools/lld/CMakeLists.txt
@@ -15,7 +15,6 @@ target_link_libraries(lld
@@ -15,10 +15,15 @@ target_link_libraries(lld
lldCOFF
lldDriver
lldELF
@ -12,3 +12,12 @@ Index: lld/tools/lld/CMakeLists.txt
lldMinGW
lldWasm
)
+
+if (LLD_ENABLE_MACHO)
+ target_link_libraries(lld
+ lldMachO2
+ )
+endif()
install(TARGETS lld
RUNTIME DESTINATION bin)

View file

@ -4,16 +4,20 @@ internals.
Index: lld/tools/lld/lld.cpp
--- lld/tools/lld/lld.cpp.orig
+++ lld/tools/lld/lld.cpp
@@ -148,10 +148,12 @@ static int lldMain(int argc, const char **argv, llvm::
@@ -148,12 +148,16 @@ static int lldMain(int argc, const char **argv, llvm::
return !elf::link(args, exitEarly, stdoutOS, stderrOS);
case WinLink:
return !coff::link(args, exitEarly, stdoutOS, stderrOS);
+#if 0
+#ifdef LLD_ENABLE_MACHO
case Darwin:
return !macho::link(args, exitEarly, stdoutOS, stderrOS);
case DarwinOld:
return !mach_o::link(args, exitEarly, stdoutOS, stderrOS);
+#endif
+#ifdef LLD_ENABLE_WASM
case Wasm:
return !lld::wasm::link(args, exitEarly, stdoutOS, stderrOS);
+#endif
default:
die("lld is a generic driver.\n"
"Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld"