[llvm-branch-commits] [libcxx] 6af8758 - [libcxx] Handle target triples with dashes in platform name

Mikhail Maltsev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 11 06:42:21 PDT 2020


Author: Mikhail Maltsev
Date: 2020-09-11T14:42:05+01:00
New Revision: 6af8758ba4d7c42298a14fcc2433f9ab49215ac1

URL: https://github.com/llvm/llvm-project/commit/6af8758ba4d7c42298a14fcc2433f9ab49215ac1
DIFF: https://github.com/llvm/llvm-project/commit/6af8758ba4d7c42298a14fcc2433f9ab49215ac1.diff

LOG: [libcxx] Handle target triples with dashes in platform name

Target triples may contain a dash in the platform name (e.g.
"aarch64-arm-none-eabi"). Account for it when splitting the triple
into components.

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D87508

Added: 
    

Modified: 
    libcxx/utils/libcxx/test/config.py

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index 086db1d7f560..42438b3ccf2e 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -245,7 +245,7 @@ def configure_features(self):
         # XFAIL markers for tests that are known to fail with versions of
         # libc++ as were shipped with a particular triple.
         if self.use_system_cxx_lib:
-            (arch, vendor, platform) = self.config.target_triple.split('-')
+            (arch, vendor, platform) = self.config.target_triple.split('-', 2)
             (sysname, version) = re.match(r'([^0-9]+)([0-9\.]*)', platform).groups()
 
             self.config.available_features.add('with_system_cxx_lib={}-{}-{}{}'.format(arch, vendor, sysname, version))


        


More information about the llvm-branch-commits mailing list