diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2019-11-06 15:40:07 -0800 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2019-11-06 15:42:09 -0800 |
commit | e74e61ff297e81c0a9bda54037033fc40fc76e1d (patch) | |
tree | eb92910015980c4c2242b2addfdbc080a8334e98 /libunwind/src | |
parent | aa582e3648cc4036aec3b9302ab93bfe9929d19c (diff) | |
download | bcm5719-llvm-e74e61ff297e81c0a9bda54037033fc40fc76e1d.tar.gz bcm5719-llvm-e74e61ff297e81c0a9bda54037033fc40fc76e1d.zip |
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.
Diffstat (limited to 'libunwind/src')
-rw-r--r-- | libunwind/src/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt index eaa8ae6ca98..d02f8a21dd4 100644 --- a/libunwind/src/CMakeLists.txt +++ b/libunwind/src/CMakeLists.txt @@ -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) |