We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9c7d60 commit 781d5cfCopy full SHA for 781d5cf
libc/startup/linux/CMakeLists.txt
@@ -26,7 +26,11 @@ function(merge_relocatable_object name)
26
)
27
# Pass -r to the driver is much cleaner than passing -Wl,-r: the compiler knows it is
28
# a relocatable linking and will not pass other irrelevant flags to the linker.
29
- target_link_options(${relocatable_target} PRIVATE -r -nostdlib --target=${explicit_target_triple})
+ set(link_opts -r -nostdlib)
30
+ if (explicit_target_triple AND LLVM_ENABLE_LLD)
31
+ list(APPEND link_opts --target=${explicit_target_triple})
32
+ endif()
33
+ target_link_options(${relocatable_target} PRIVATE ${link_opts})
34
set_target_properties(
35
${relocatable_target}
36
PROPERTIES
0 commit comments