[libcxx] r342813 - [libcxx] Fix the definition of the check-cxx-abilist target on Darwin
Louis Dionne
ldionne at apple.com
Sat Sep 22 11:39:38 PDT 2018
Author: ldionne
Date: Sat Sep 22 11:39:38 2018
New Revision: 342813
URL: http://llvm.org/viewvc/llvm-project?rev=342813&view=rev
Log:
[libcxx] Fix the definition of the check-cxx-abilist target on Darwin
Summary:
r342805 added support for the check-cxx-abilist target on FreeBSD, but broke
the target on macOS in doing so. The problem is that the GENERIC_TARGET_TRIPLE
gets overwritten after replacing the FreeBSD regular expression, which
nullifies the replacement done with the darwin regular expression.
Reviewers: dim, EricWF
Subscribers: emaste, mgorny, krytarowski, christof, dexonsmith, cfe-commits, libcxx-commits
Differential Revision: https://reviews.llvm.org/D52394
Modified:
libcxx/trunk/lib/abi/CMakeLists.txt
Modified: libcxx/trunk/lib/abi/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/abi/CMakeLists.txt?rev=342813&r1=342812&r2=342813&view=diff
==============================================================================
--- libcxx/trunk/lib/abi/CMakeLists.txt (original)
+++ libcxx/trunk/lib/abi/CMakeLists.txt Sat Sep 22 11:39:38 2018
@@ -1,12 +1,16 @@
if (DEFINED TARGET_TRIPLE)
- # Ignore the major, minor, and patchlevel versions of darwin targets.
- string(REGEX REPLACE "darwin[0-9]+\\.[0-9]+\\.[0-9]+" "darwin"
- GENERIC_TARGET_TRIPLE "${TARGET_TRIPLE}")
-
- # Ignore the major and minor versions of freebsd targets.
- string(REGEX REPLACE "freebsd[0-9]+\\.[0-9]+" "freebsd"
- GENERIC_TARGET_TRIPLE "${TARGET_TRIPLE}")
+ if (TARGET_TRIPLE MATCHES "darwin")
+ # Ignore the major, minor, and patchlevel versions of darwin targets.
+ string(REGEX REPLACE "darwin[0-9]+\\.[0-9]+\\.[0-9]+" "darwin"
+ GENERIC_TARGET_TRIPLE "${TARGET_TRIPLE}")
+ elseif(TARGET_TRIPLE MATCHES "freebsd")
+ # Ignore the major and minor versions of freebsd targets.
+ string(REGEX REPLACE "freebsd[0-9]+\\.[0-9]+" "freebsd"
+ GENERIC_TARGET_TRIPLE "${TARGET_TRIPLE}")
+ else()
+ set(GENERIC_TARGET_TRIPLE "${TARGET_TRIPLE}")
+ endif()
endif()
# Detect if we are building in the same configuration used to generate
More information about the libcxx-commits
mailing list