summaryrefslogtreecommitdiff
path: root/lib/abi/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/abi/CMakeLists.txt')
-rw-r--r--lib/abi/CMakeLists.txt18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/abi/CMakeLists.txt b/lib/abi/CMakeLists.txt
index e3eb3bf39942..c207674258a1 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,10 +26,11 @@ endif()
if (LIBCXX_HAS_ABILIST_CONFIGURATION)
- set(ABILIST_FILE "${CMAKE_CURRENT_LIST_DIR}/${TARGET_TRIPLE}.abilist")
- set(SYMDIFF_EXE "${LIBCXX_SOURCE_DIR}/utils/sym_check/sym_diff.py")
+ set(ABILIST_FILE "${CMAKE_CURRENT_LIST_DIR}/${GENERIC_TARGET_TRIPLE}.abilist")
+ set(SYMDIFF_EXE "${LIBCXX_SOURCE_DIR}/utils/sym_diff.py")
add_custom_target(check-cxx-abilist
- ${SYMDIFF_EXE} --only-stdlib-symbols ${ABILIST_FILE} $<TARGET_SONAME_FILE:cxx_shared>
+ ${SYMDIFF_EXE} --only-stdlib-symbols --strict ${ABILIST_FILE}
+ $<TARGET_SONAME_FILE:cxx_shared>
DEPENDS cxx_shared
COMMENT "Testing ABI compatibility...")
endif()