[PATCH] D58598: [CMake] Support alternative C++ ABI library
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 25 16:42:22 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL354835: [CMake] Support alternative C++ ABI library (authored by phosek, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D58598?vs=188236&id=188277#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58598/new/
https://reviews.llvm.org/D58598
Files:
test-suite/trunk/CMakeLists.txt
test-suite/trunk/MultiSource/Applications/obsequi/CMakeLists.txt
Index: test-suite/trunk/CMakeLists.txt
===================================================================
--- test-suite/trunk/CMakeLists.txt
+++ test-suite/trunk/CMakeLists.txt
@@ -155,6 +155,21 @@
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} ${TEST_SUITE_EXTRA_EXE_LINKER_FLAGS}")
+# This is either directly the C++ ABI library or the full C++ library
+# which pulls in the ABI transitively.
+set(TEST_SUITE_CXX_ABI "default" CACHE STRING "Specify C++ ABI library to use.")
+set(CXXABIS "none default libstdc++ libsupc++ libc++ libc++abi")
+set_property(CACHE TEST_SUITE_CXX_ABI PROPERTY STRINGS "${CXXABIS}")
+if (TEST_SUITE_CXX_ABI STREQUAL "default")
+ if (APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD|Fuchsia")
+ set(TEST_SUITE_CXX_ABI_LIBNAME "c++abi")
+ else()
+ set(TEST_SUITE_CXX_ABI_LIBNAME "supc++")
+ endif()
+else()
+ STRING(REGEX REPLACE "^lib" "" TEST_SUITE_CXX_ABI_LIBNAME ${TEST_SUITE_CXX_ABI})
+endif()
+
include(TestSuite)
include(SingleMultiSource)
find_package(TCL)
Index: test-suite/trunk/MultiSource/Applications/obsequi/CMakeLists.txt
===================================================================
--- test-suite/trunk/MultiSource/Applications/obsequi/CMakeLists.txt
+++ test-suite/trunk/MultiSource/Applications/obsequi/CMakeLists.txt
@@ -6,7 +6,7 @@
list(APPEND CPPFLAGS -DHASHCODEBITS=23)
endif()
if(NOT "${ARCH}" STREQUAL "PowerPC")
- list(APPEND LDFLAGS -lsupc++)
+ list(APPEND LDFLAGS -l${TEST_SUITE_CXX_ABI_LIBNAME})
endif()
set(RUN_OPTIONS < input)
llvm_multisource(Obsequi)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58598.188277.patch
Type: text/x-patch
Size: 1553 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190226/d6eddf36/attachment.bin>
More information about the llvm-commits
mailing list