summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbernhardkaindl <43588962+bernhardkaindl@users.noreply.github.com>2021-09-22 00:23:10 +0200
committerGitHub <noreply@github.com>2021-09-22 00:23:10 +0200
commit979c355c99da2f8738892b57e0459cb6a9c9453c (patch)
tree0cbcc7813de96ca83bccc67342b5f771d1083303
parent92f199d57bd0ac1931504909319e771e70d267fd (diff)
downloadspack-979c355c99da2f8738892b57e0459cb6a9c9453c.tar.gz
spack-979c355c99da2f8738892b57e0459cb6a9c9453c.tar.bz2
spack-979c355c99da2f8738892b57e0459cb6a9c9453c.tar.xz
spack-979c355c99da2f8738892b57e0459cb6a9c9453c.zip
spack/build_environment.py: Clean MAKEFLAGS, DISPLAY and TERM (#26092)
clean_environment(): Unset three more environment variables: MAKEFLAGS: Affects make, can eg indirectly inhibit enabling parallel build DISPLAY: Tests of GUI widget libraries might try to connect to an X server TERM: Could make testsuites attempt to color their output
-rw-r--r--lib/spack/spack/build_environment.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 97903075e1..82baaee256 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -171,6 +171,13 @@ def clean_environment():
env.unset('CMAKE_PREFIX_PATH')
+ # Affects GNU make, can e.g. indirectly inhibit enabling parallel build
+ env.unset('MAKEFLAGS')
+ # Could make testsuites attempt to color their output
+ env.unset('TERM')
+ # Tests of GUI widget libraries might try to connect to an X server
+ env.unset('DISPLAY')
+
# Avoid that libraries of build dependencies get hijacked.
env.unset('LD_PRELOAD')
env.unset('DYLD_INSERT_LIBRARIES')