[clang] 5aa0f9c - Use installed llvm-lit.py instead of lit.py PR-51072

Yaron Keren via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 17 23:06:26 PDT 2021


Author: Yaron Keren
Date: 2021-08-18T09:06:06+03:00
New Revision: 5aa0f9cc9ab267803ad7bcfd14c8fd8bbffd82cb

URL: https://github.com/llvm/llvm-project/commit/5aa0f9cc9ab267803ad7bcfd14c8fd8bbffd82cb
DIFF: https://github.com/llvm/llvm-project/commit/5aa0f9cc9ab267803ad7bcfd14c8fd8bbffd82cb.diff

LOG: Use installed llvm-lit.py instead of lit.py PR-51072

Three tests fail when building and testing LLVM from the Visual C++ environment
since they use the repo version of lit.py that do not have local customization
builtin_parameters = { 'build_mode' : 'Release' }
https://bugs.llvm.org/show_bug.cgi?id=51072

Reviewed By: dyung

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

Added: 
    

Modified: 
    clang/test/utils/update_cc_test_checks/lit.local.cfg

Removed: 
    


################################################################################
diff  --git a/clang/test/utils/update_cc_test_checks/lit.local.cfg b/clang/test/utils/update_cc_test_checks/lit.local.cfg
index 14d1ba260bb4a..6b4f5cfc62ed3 100644
--- a/clang/test/utils/update_cc_test_checks/lit.local.cfg
+++ b/clang/test/utils/update_cc_test_checks/lit.local.cfg
@@ -1,4 +1,5 @@
 import os
+import glob
 
 import lit.util
 
@@ -19,7 +20,9 @@ extra_args += ' --opt ' + shell_quote(opt_path)
 script_path = os.path.join(config.llvm_src_root, 'utils',
                            'update_cc_test_checks.py')
 assert os.path.isfile(script_path)
-lit = config.llvm_external_lit if config.llvm_external_lit else shell_quote(os.path.join(config.llvm_src_root, 'utils', 'lit', 'lit.py'))
+# Windows: llvm-lit.py, Linux: llvm-lit
+llvm_lit = glob.glob(os.path.join(config.llvm_tools_dir, 'llvm-lit*'))[0]
+lit = config.llvm_external_lit if config.llvm_external_lit else shell_quote(llvm_lit)
 python = shell_quote(config.python_executable)
 config.substitutions.append(
     ('%update_cc_test_checks', "%s %s %s" % (


        


More information about the cfe-commits mailing list