Skip to content

Commit 8522f51

Browse files
aescolarkartben
authored andcommitted
boards native: Support using lld as linker for native simulator runner
Let's assume that if a user sets the linker to be lld (likely with CONFIG_LLVM_USE_LLD=y) that they also want the native simulator runner to be linked with it. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
1 parent c50a48a commit 8522f51

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

boards/native/common/natsim_config.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ if(SYSROOT_DIR)
1313
target_link_options(native_simulator INTERFACE "--sysroot=${SYSROOT_DIR}")
1414
endif()
1515

16+
if("${LINKER}" STREQUAL "lld")
17+
target_link_options(native_simulator INTERFACE "-fuse-ld=lld")
18+
endif()
19+
1620
set(nsi_config_content
1721
${nsi_config_content}
1822
"NSI_AR:=${CMAKE_AR}"

0 commit comments

Comments
 (0)