[llvm] 6466c9a - [lit] Passthrough CLANG_MODULE_CACHE_PATH env var
Alex Brachet via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 11 14:05:41 PDT 2022
Author: Alex Brachet
Date: 2022-06-11T21:04:02Z
New Revision: 6466c9abf3674bade1f6ee859f24ebc7aaf9cd88
URL: https://github.com/llvm/llvm-project/commit/6466c9abf3674bade1f6ee859f24ebc7aaf9cd88
DIFF: https://github.com/llvm/llvm-project/commit/6466c9abf3674bade1f6ee859f24ebc7aaf9cd88.diff
LOG: [lit] Passthrough CLANG_MODULE_CACHE_PATH env var
This environment variable can be set to control module
caching. It disables caching by setting the variable
empty. As such, it needs to be handled differently
from other environment variables here which are
assumed to not be empty.
Added:
Modified:
llvm/utils/lit/lit/TestingConfig.py
Removed:
################################################################################
diff --git a/llvm/utils/lit/lit/TestingConfig.py b/llvm/utils/lit/lit/TestingConfig.py
index bdb87c376127c..a4c9251c96386 100644
--- a/llvm/utils/lit/lit/TestingConfig.py
+++ b/llvm/utils/lit/lit/TestingConfig.py
@@ -77,6 +77,14 @@ def fromdefaults(litConfig):
if val:
environment[var] = val
+ pass_vars_emptyable = [
+ 'CLANG_MODULE_CACHE_PATH',
+ ]
+
+ for var in pass_vars_emptyable:
+ if var in os.environ:
+ environment[var] = os.environ[var]
+
# Set the default available features based on the LitConfig.
available_features = []
if litConfig.useValgrind:
More information about the llvm-commits
mailing list