summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-12-30 16:55:17 +0100
committerLéo Lam <leo@leolam.fr>2021-12-30 16:55:33 +0100
commit99e1bbf423f085e34b0e7a354e3e9ec9ff54dae0 (patch)
tree457512e0b28c5627a08bb3fbafd5cf0f60f1c939 /toolchain
parent1ecd2959cb68c06d86c9cac15c90ffaef99c32f1 (diff)
Add support for using custom linker (e.g. mold)
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/ToolchainNX64.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/toolchain/ToolchainNX64.cmake b/toolchain/ToolchainNX64.cmake
index 247e82e3..cbf6f119 100644
--- a/toolchain/ToolchainNX64.cmake
+++ b/toolchain/ToolchainNX64.cmake
@@ -38,5 +38,10 @@ add_definitions(-D MATCHING_HACK_NX_CLANG)
add_link_options(-stdlib=libc++ -nostdlib)
add_link_options(-fPIC -Wl,-Bsymbolic-functions -shared)
-# Use lld for performance reasons (and because we don't want a dependency on GNU tools)
-add_link_options(-fuse-ld=lld)
+if (DEFINED UKING_LINKER)
+ message(STATUS "Using custom linker: ${UKING_LINKER}")
+ add_link_options(-fuse-ld=${UKING_LINKER})
+else()
+ # Use lld for performance reasons (and because we don't want a dependency on GNU tools)
+ add_link_options(-fuse-ld=lld)
+endif()