arch posix: When building for the native_simulator only link ASAN once
Only request the linker to link ASAN in the final stage, not during the partial linking stage. This fixes a link issue when building with llvm. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
b59b21f8bb
commit
4f7b144ef6
1 changed files with 3 additions and 1 deletions
|
@ -188,7 +188,9 @@ list(JOIN LLVM_SANITIZERS "," LLVM_SANITIZERS_ARG)
|
|||
if(NOT ${LLVM_SANITIZERS_ARG} STREQUAL "")
|
||||
set(LLVM_SANITIZERS_ARG "-fsanitize=${LLVM_SANITIZERS_ARG}")
|
||||
zephyr_compile_options("${LLVM_SANITIZERS_ARG}")
|
||||
zephyr_link_libraries("${LLVM_SANITIZERS_ARG}")
|
||||
if (CONFIG_NATIVE_APPLICATION)
|
||||
zephyr_link_libraries("${LLVM_SANITIZERS_ARG}")
|
||||
endif()
|
||||
|
||||
target_link_options(native_simulator INTERFACE ${LLVM_SANITIZERS_ARG})
|
||||
target_compile_options(native_simulator INTERFACE ${LLVM_SANITIZERS_ARG})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue