From 6466c9abf3674bade1f6ee859f24ebc7aaf9cd88 Mon Sep 17 00:00:00 2001 From: Alex Brachet Date: Sat, 11 Jun 2022 21:04:02 +0000 Subject: [PATCH] [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. --- llvm/utils/lit/lit/TestingConfig.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/llvm/utils/lit/lit/TestingConfig.py b/llvm/utils/lit/lit/TestingConfig.py index bdb87c3..a4c9251 100644 --- a/llvm/utils/lit/lit/TestingConfig.py +++ b/llvm/utils/lit/lit/TestingConfig.py @@ -77,6 +77,14 @@ class TestingConfig(object): 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: -- 2.7.4