[libcxx-commits] [libcxx] 9e29852 - [libcxx] [test] Fix detection of clang-cl when cross compiling

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 5 14:49:38 PST 2021


Author: Martin Storsjö
Date: 2021-03-06T00:49:26+02:00
New Revision: 9e29852f5c0f61ef0d8a3773e00d5d56ebf6a83d

URL: https://github.com/llvm/llvm-project/commit/9e29852f5c0f61ef0d8a3773e00d5d56ebf6a83d
DIFF: https://github.com/llvm/llvm-project/commit/9e29852f5c0f61ef0d8a3773e00d5d56ebf6a83d.diff

LOG: [libcxx] [test] Fix detection of clang-cl when cross compiling

When cross compiling, the compiler tool doesn't have a .exe suffix.

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

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 7ab7606d1077..955ef7979c7e 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -175,7 +175,7 @@ def configure_cxx(self):
         # 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:


        


More information about the libcxx-commits mailing list