cmake: remove llvm runtime library selection from target_base.cmake
The selection of the runtime library when using LLVM has already been done in llvm/target.cmake and passed to the toolchain_ld_base() function through the global TOOLCHAIN_LD_FLAGS setting. The only reason this haven't been noticed is because of CMake's built-in symbol de-duplication feature. Remove the redundant runtime library handling. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
9bb0140522
commit
22c45c9234
2 changed files with 0 additions and 22 deletions
|
@ -28,18 +28,6 @@ macro(toolchain_ld_base)
|
|||
)
|
||||
endif()
|
||||
|
||||
if (CONFIG_LLVM_USE_LD)
|
||||
if(CONFIG_LIBGCC_RTLIB)
|
||||
set(runtime_lib "libgcc")
|
||||
elseif(CONFIG_COMPILER_RT_RTLIB)
|
||||
set(runtime_lib "compiler_rt")
|
||||
endif()
|
||||
|
||||
zephyr_link_libraries(
|
||||
--config ${ZEPHYR_BASE}/cmake/toolchain/llvm/clang_${runtime_lib}.cfg
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CPP AND (CMAKE_C_COMPILER_ID STREQUAL "Clang"))
|
||||
# GNU ld complains when used with llvm/clang:
|
||||
# error: section: init_array is not contiguous with other relro sections
|
||||
|
|
|
@ -43,14 +43,4 @@ macro(toolchain_ld_base)
|
|||
-Wl,-z,norelro
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LIBGCC_RTLIB)
|
||||
set(runtime_lib "libgcc")
|
||||
elseif(CONFIG_COMPILER_RT_RTLIB)
|
||||
set(runtime_lib "compiler_rt")
|
||||
endif()
|
||||
|
||||
zephyr_link_libraries(
|
||||
--config ${ZEPHYR_BASE}/cmake/toolchain/llvm/clang_${runtime_lib}.cfg
|
||||
)
|
||||
endmacro()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue