forked from OSchip/llvm-project
unwind: restore the LINKER_LANGUAGE
Have CMake treat the unwind libraries as C libraries rather than C++. There is no C++ runtime dependency at runtime. This ensures that we do not accidentally end up with a link against the C++ runtime. We need to explicitly reset the implicitly linked libraries for C++ to ensure that we do not have CMake force the link against the C++ runtime. This adjustment should enable the NetBSD bots to be happy with this change.
This commit is contained in:
parent
aa582e3648
commit
e74e61ff29
|
@ -108,6 +108,10 @@ set_property(SOURCE ${LIBUNWIND_CXX_SOURCES}
|
|||
set_property(SOURCE ${LIBUNWIND_C_SOURCES}
|
||||
APPEND_STRING PROPERTY COMPILE_FLAGS " ${LIBUNWIND_C_FLAGS}")
|
||||
|
||||
# NOTE: avoid implicit dependencies on C++ runtimes. libunwind uses C++ for
|
||||
# ease, but does not rely on C++ at runtime.
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
|
||||
|
||||
# Build the shared library.
|
||||
if (LIBUNWIND_ENABLE_SHARED)
|
||||
add_library(unwind_shared SHARED ${LIBUNWIND_SOURCES} ${LIBUNWIND_HEADERS})
|
||||
|
@ -126,6 +130,7 @@ if (LIBUNWIND_ENABLE_SHARED)
|
|||
CXX_STANDARD_REQUIRED ON
|
||||
COMPILE_FLAGS "${LIBUNWIND_COMPILE_FLAGS}"
|
||||
LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}"
|
||||
LINKER_LANGUAGE C
|
||||
OUTPUT_NAME "unwind"
|
||||
VERSION "1.0"
|
||||
SOVERSION "1")
|
||||
|
@ -150,6 +155,7 @@ if (LIBUNWIND_ENABLE_STATIC)
|
|||
CXX_STANDARD_REQUIRED ON
|
||||
COMPILE_FLAGS "${LIBUNWIND_COMPILE_FLAGS}"
|
||||
LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}"
|
||||
LINKER_LANGUAGE C
|
||||
OUTPUT_NAME "unwind")
|
||||
|
||||
if(LIBUNWIND_HERMETIC_STATIC_LIBRARY)
|
||||
|
|
Loading…
Reference in New Issue