[libcxx] [test] Fix detection of clang-cl when cross compiling
authorMartin Storsjö <martin@martin.st>
Sun, 2 Feb 2020 21:22:49 +0000 (23:22 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 5 Mar 2021 22:49:26 +0000 (00:49 +0200)
When cross compiling, the compiler tool doesn't have a .exe suffix.

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

libcxx/utils/libcxx/test/config.py

index 7ab7606..955ef79 100644 (file)
@@ -175,7 +175,7 @@ class Configuration(object):
         # Gather various compiler parameters.
         cxx = self.get_lit_conf('cxx_under_test')
         self.cxx_is_clang_cl = cxx is not None and \
-                               os.path.basename(cxx) == 'clang-cl.exe'
+                               os.path.basename(cxx).startswith('clang-cl')
         # If no specific cxx_under_test was given, attempt to infer it as
         # clang++.
         if cxx is None or self.cxx_is_clang_cl: