Author: Tom Stellard Date: 2021-07-13T10:47:30-07:00 New Revision: 303ddb60a2d28fb7603266d8977f69ac77b194dd
URL: https://github.com/llvm/llvm-project/commit/303ddb60a2d28fb7603266d8977f69ac77b194dd DIFF: https://github.com/llvm/llvm-project/commit/303ddb60a2d28fb7603266d8977f69ac77b194dd.diff LOG: Fix utils/update_cc_test_checks/check-globals.test on stand-alone builds We want to use LLVM_EXTERNAL_LIT if defined for the %lit substitution. Reviewed By: jdenny Differential Revision: https://reviews.llvm.org/D105873 Added: Modified: clang/test/CMakeLists.txt clang/test/lit.site.cfg.py.in clang/test/utils/update_cc_test_checks/lit.local.cfg Removed: ################################################################################ diff --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt index e2f6d6772dea3..52a3a3b761af0 100644 --- a/clang/test/CMakeLists.txt +++ b/clang/test/CMakeLists.txt @@ -33,6 +33,7 @@ configure_lit_site_cfg( "LLVM_LIBS_DIR" "SHLIBDIR" "LLVM_LIT_TOOLS_DIR" + "LLVM_EXTERNAL_LIT" "CLANG_BINARY_DIR" "CLANG_SOURCE_DIR" "CLANG_TOOLS_DIR" diff --git a/clang/test/lit.site.cfg.py.in b/clang/test/lit.site.cfg.py.in index f31ede2c39575..7b174e681bf34 100644 --- a/clang/test/lit.site.cfg.py.in +++ b/clang/test/lit.site.cfg.py.in @@ -34,6 +34,7 @@ config.python_executable = "@Python3_EXECUTABLE@" config.use_z3_solver = lit_config.params.get('USE_Z3_SOLVER', "@USE_Z3_SOLVER@") config.has_plugins = @LLVM_ENABLE_PLUGINS@ config.clang_vendor_uti = "@CLANG_VENDOR_UTI@" +config.llvm_external_lit = path(r"@LLVM_EXTERNAL_LIT@") # Support substitution of the tools and libs dirs with user parameters. This is # used when we can't determine the tool dir at configuration time. 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 cbcc05dff4ca7..14d1ba260bb4a 100644 --- a/clang/test/utils/update_cc_test_checks/lit.local.cfg +++ b/clang/test/utils/update_cc_test_checks/lit.local.cfg @@ -19,7 +19,7 @@ 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 = shell_quote(os.path.join(config.llvm_src_root, 'utils', 'lit', 'lit.py')) +lit = config.llvm_external_lit if config.llvm_external_lit else shell_quote(os.path.join(config.llvm_src_root, 'utils', 'lit', 'lit.py')) python = shell_quote(config.python_executable) config.substitutions.append( ('%update_cc_test_checks', "%s %s %s" % ( _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits