summaryrefslogtreecommitdiff
path: root/cross-project-tests
diff options
context:
space:
mode:
Diffstat (limited to 'cross-project-tests')
-rw-r--r--cross-project-tests/lit.cfg.py14
-rw-r--r--cross-project-tests/lit.site.cfg.py.in4
2 files changed, 17 insertions, 1 deletions
diff --git a/cross-project-tests/lit.cfg.py b/cross-project-tests/lit.cfg.py
index 7bda584dc317..0855af461699 100644
--- a/cross-project-tests/lit.cfg.py
+++ b/cross-project-tests/lit.cfg.py
@@ -74,7 +74,13 @@ if is_msvc:
# use_clang() and use_lld() respectively, so set them to "", if needed.
if not hasattr(config, 'clang_src_dir'):
config.clang_src_dir = ""
-llvm_config.use_clang(required=('clang' in config.llvm_enabled_projects))
+# Facebook T92898286
+should_test_bolt = get_required_attr(config, "llvm_test_bolt")
+if should_test_bolt:
+ llvm_config.use_clang(required=('clang' in config.llvm_enabled_projects), additional_flags=['--post-link-optimize'])
+else:
+ llvm_config.use_clang(required=('clang' in config.llvm_enabled_projects))
+# End Facebook T92898286
if not hasattr(config, 'lld_src_dir'):
config.lld_src_dir = ""
@@ -256,3 +262,9 @@ llvm_config.feature_config(
# Allow 'REQUIRES: XXX-registered-target' in tests.
for arch in config.targets_to_build:
config.available_features.add(arch.lower() + '-registered-target')
+
+# Facebook T92898286
+# Ensure the user's PYTHONPATH is included.
+if 'PYTHONPATH' in os.environ:
+ config.environment['PYTHONPATH'] = os.environ['PYTHONPATH']
+# End Facebook T92898286
diff --git a/cross-project-tests/lit.site.cfg.py.in b/cross-project-tests/lit.site.cfg.py.in
index 39458dfc79af..2d53cd377f03 100644
--- a/cross-project-tests/lit.site.cfg.py.in
+++ b/cross-project-tests/lit.site.cfg.py.in
@@ -21,6 +21,10 @@ config.mlir_src_root = "@MLIR_SOURCE_DIR@"
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
+# Facebook T92898286
+config.llvm_test_bolt = lit.util.pythonize_bool("@LLVM_TEST_BOLT@")
+# End Facebook T92898286
+
import lit.llvm
lit.llvm.initialize(lit_config, config)