diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-01-20 00:57:08 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-01-20 00:57:08 +0000 |
commit | fba0eeedddd43ba6656089bdd81f43b1204fc4a8 (patch) | |
tree | 039c6f2a3421826a1e3816a4657d6a9f41e52dc7 /lib/abi/CMakeLists.txt | |
parent | e013dacf4a4217343f82b2b5fddb2428d26572c5 (diff) |
Fix handling of Apple target triple when checking the ABI lists.
The check-cxx-abilist rule uses TARGET_TRIPLE to determine which
ABI list to check. However the triple on Apple contains the darwin
version which changes frequently, but libc++ doesn't need
different ABI lists for each darwin version.
This patch strips the minor version and patchlevel from TARGET_TRIPLE
before using it to determine the ABI list.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/abi/CMakeLists.txt')
-rw-r--r-- | lib/abi/CMakeLists.txt | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/abi/CMakeLists.txt b/lib/abi/CMakeLists.txt index 41240d72e..464643c70 100644 --- a/lib/abi/CMakeLists.txt +++ b/lib/abi/CMakeLists.txt @@ -1,8 +1,15 @@ +if (DEFINED TARGET_TRIPLE) + # Ignore the minor and patchlevel versions of the darwin + # target. + string(REGEX REPLACE "darwin16\\.[0-9]\\.[0-9]" "darwin16" + GENERIC_TARGET_TRIPLE "${TARGET_TRIPLE}") +endif() + # Detect if we are building in the same configuration used to generate # the abilist files. -if (DEFINED TARGET_TRIPLE - AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/${TARGET_TRIPLE}.abilist" +if (DEFINED GENERIC_TARGET_TRIPLE + AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/${GENERIC_TARGET_TRIPLE}.abilist" AND TARGET cxx_shared AND ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi" OR (APPLE AND "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "default")) @@ -19,7 +26,7 @@ endif() if (LIBCXX_HAS_ABILIST_CONFIGURATION) - set(ABILIST_FILE "${CMAKE_CURRENT_LIST_DIR}/${TARGET_TRIPLE}.abilist") + set(ABILIST_FILE "${CMAKE_CURRENT_LIST_DIR}/${GENERIC_TARGET_TRIPLE}.abilist") set(SYMDIFF_EXE "${LIBCXX_SOURCE_DIR}/utils/sym_check/sym_diff.py") add_custom_target(check-cxx-abilist ${SYMDIFF_EXE} --only-stdlib-symbols --strict ${ABILIST_FILE} |