Skip to content

Commit 18c7080

Browse files
committed
cmake: lld: Remove duplicate -fuse-ld=lld
-fuse-ld=lld is currently specified twice through the baremetal property (in cmake/linker/lld/linker_flags.cmake) and TOOLCHAIN_LD_FLAGS (in cmake/linker/lld/target.cmake). This doesn't really harm anything as it isn't duplicated on the link line (and specifying it multiple times wouldn't hurt even if it was), but it also doesn't really help anything. -fuse-ld isn't baremetal-specific and setting it via TOOLCHAIN_LD_FLAGS will cover this case anyway, so remove this duplicate. Signed-off-by: Jonathon Penix <[email protected]>
1 parent 0d1a788 commit 18c7080

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

cmake/linker/lld/linker_flags.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ if(NOT CONFIG_MINIMAL_LIBCPP AND NOT CONFIG_NATIVE_LIBRARY AND NOT CONFIG_EXTERN
1111
set_property(TARGET linker PROPERTY cpp_base ${LINKERFLAGPREFIX},-z,norelro)
1212
endif()
1313

14-
# Force LLVM to use built-in lld linker
15-
if(NOT CONFIG_LLVM_USE_LD)
16-
check_set_linker_property(TARGET linker APPEND PROPERTY baremetal -fuse-ld=lld)
17-
endif()
18-
1914
set_property(TARGET linker PROPERTY no_position_independent "${LINKERFLAGPREFIX},--no-pie")
2015

2116
set_property(TARGET linker PROPERTY lto_arguments)

0 commit comments

Comments
 (0)