From: Mikhail Maltsev Date: Fri, 11 Sep 2020 13:41:36 +0000 (+0100) Subject: [libcxx] Handle target triples with dashes in platform name X-Git-Tag: llvmorg-13-init~12355 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6af8758ba4d7c42298a14fcc2433f9ab49215ac1;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py index 086db1d..42438b3 100644 --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -245,7 +245,7 @@ class Configuration(object): # 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))