summaryrefslogtreecommitdiff
path: root/test/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index 1939792327..246f2701ce 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -58,6 +58,12 @@ if config.test_exec_root is None:
# configuration hasn't been created by the build system, or we are in an
# out-of-tree build situation).
+ # Check for 'llvm_site_config' user parameter, and use that if available.
+ site_cfg = lit.params.get('llvm_site_config', None)
+ if site_cfg and os.path.exists(site_cfg):
+ lit.load_config(config, site_cfg)
+ raise SystemExit
+
# Try to detect the situation where we are using an out-of-tree build by
# looking for 'llvm-config'.
#