[libcxx] r342805 - Similar to the handling of darwin target triples, strip the version

Dimitry Andric dimitry at andric.com
Sat Sep 22 07:37:49 PDT 2018


Author: dim
Date: Sat Sep 22 07:37:49 2018
New Revision: 342805

URL: http://llvm.org/viewvc/llvm-project?rev=342805&view=rev
Log:
Similar to the handling of darwin target triples, strip the version
numbers off of freebsd target triples, when generating the name of the
ABI list file for check-cxx-abilist target.

Also remove unnecessary parentheses in the regex for darwin, and
slightly reword the comment.

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=342805&r1=342804&r2=342805&view=diff
==============================================================================
--- libcxx/trunk/lib/abi/CMakeLists.txt (original)
+++ libcxx/trunk/lib/abi/CMakeLists.txt Sat Sep 22 07:37:49 2018
@@ -1,9 +1,12 @@
 
 if (DEFINED TARGET_TRIPLE)
-    # Ignore the major, minor, and patchlevel versions of the darwin
-    # target.
-    string(REGEX REPLACE "darwin([0-9]+)\\.([0-9]+)\\.([0-9]+)" "darwin"
-      GENERIC_TARGET_TRIPLE "${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}")
 endif()
 
 # Detect if we are building in the same configuration used to generate




More information about the libcxx-commits mailing list