[PATCH] D52394: [libcxx] Fix the definition of the check-cxx-abilist target on Darwin
Louis Dionne via Phabricator
reviews at reviews.llvm.org
Sat Sep 22 11:16:03 PDT 2018
ldionne created this revision.
ldionne added reviewers: dim, EricWF.
Herald added subscribers: libcxx-commits, cfe-commits, dexonsmith, christof, krytarowski, mgorny, emaste.
ldionne updated this revision to Diff 166613.
ldionne added a comment.
Remove the change to the Darwin ABI list file, which was meant for a different commit.
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.
Repository:
rCXX libc++
https://reviews.llvm.org/D52394
Files:
libcxx/lib/abi/CMakeLists.txt
Index: libcxx/lib/abi/CMakeLists.txt
===================================================================
--- libcxx/lib/abi/CMakeLists.txt
+++ libcxx/lib/abi/CMakeLists.txt
@@ -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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52394.166613.patch
Type: text/x-patch
Size: 1246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20180922/e929129c/attachment-0001.bin>
More information about the libcxx-commits
mailing list