build system: move -fno-rtti link option next to the compile option
Previous commit has added `link_options` to the root CMakeLists.txt, can use it to collect such global link options now.
This commit is contained in:
parent
f49a78d543
commit
f287f59ae3
2 changed files with 1 additions and 4 deletions
|
@ -32,6 +32,7 @@ if(CONFIG_COMPILER_CXX_RTTI)
|
||||||
list(APPEND cxx_compile_options "-frtti")
|
list(APPEND cxx_compile_options "-frtti")
|
||||||
else()
|
else()
|
||||||
list(APPEND cxx_compile_options "-fno-rtti")
|
list(APPEND cxx_compile_options "-fno-rtti")
|
||||||
|
list(APPEND link_options "-fno-rtti") # used to invoke correct multilib variant (no-rtti) during linking
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_COMPILER_DISABLE_GCC8_WARNINGS)
|
if(CONFIG_COMPILER_DISABLE_GCC8_WARNINGS)
|
||||||
|
|
|
@ -15,7 +15,3 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC stdcpp_pthread)
|
||||||
if(NOT CONFIG_COMPILER_CXX_EXCEPTIONS)
|
if(NOT CONFIG_COMPILER_CXX_EXCEPTIONS)
|
||||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u __cxx_fatal_exception")
|
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u __cxx_fatal_exception")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CONFIG_COMPILER_CXX_RTTI)
|
|
||||||
target_link_libraries(${COMPONENT_LIB} PUBLIC -fno-rtti)
|
|
||||||
endif()
|
|
||||||
|
|
Loading…
Reference in a new issue