From ecd13e2df8df783938e2d395c07f2c4f45646397 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 4 Dec 2024 17:09:46 +0100 Subject: [PATCH] Remove SPACK_COMPILER_SPEC from the environment --- lib/spack/env/cc | 8 -------- lib/spack/spack/build_systems/compiler.py | 2 -- lib/spack/spack/test/build_environment.py | 2 -- lib/spack/spack/test/cc.py | 1 - 4 files changed, 13 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 1014efe0d27..fc2e4155e93 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -40,7 +40,6 @@ readonly params="\ SPACK_ENV_PATH SPACK_DEBUG_LOG_DIR SPACK_DEBUG_LOG_ID -SPACK_COMPILER_SPEC SPACK_LINKER_ARG SPACK_SHORT_SPEC SPACK_SYSTEM_DIRS @@ -412,13 +411,6 @@ if [ "$SPACK_TEST_COMMAND" = "dump-mode" ]; then exit fi -# If, say, SPACK_CC is set but SPACK_FC is not, we want to know. Compilers do not -# *have* to set up Fortran executables, so we need to tell the user when a build is -# about to attempt to use them unsuccessfully. -if [ -z "$command" ]; then - die "Compiler '$SPACK_COMPILER_SPEC' does not have a $language compiler configured." -fi - # # Filter '.' and Spack environment directories out of PATH so that # this script doesn't just call itself diff --git a/lib/spack/spack/build_systems/compiler.py b/lib/spack/spack/build_systems/compiler.py index af053820bf5..7a80470c03f 100644 --- a/lib/spack/spack/build_systems/compiler.py +++ b/lib/spack/spack/build_systems/compiler.py @@ -274,8 +274,6 @@ def setup_dependent_build_environment(self, env, dependent_spec): env.set("SPACK_DTAGS_TO_ADD", self.enable_new_dtags) spec = self.spec - env.set("SPACK_COMPILER_SPEC", spec.format("{name}{@version}{variants}{/hash:7}")) - if spec.extra_attributes: extra_rpaths = spec.extra_attributes.get("extra_rpaths") if extra_rpaths: diff --git a/lib/spack/spack/test/build_environment.py b/lib/spack/spack/test/build_environment.py index 1076e06b13c..8d1215caba5 100644 --- a/lib/spack/spack/test/build_environment.py +++ b/lib/spack/spack/test/build_environment.py @@ -58,7 +58,6 @@ def build_environment(working_env): os.environ["SPACK_ENV_PATH"] = "test" os.environ["SPACK_DEBUG_LOG_DIR"] = "." os.environ["SPACK_DEBUG_LOG_ID"] = "foo-hashabc" - os.environ["SPACK_COMPILER_SPEC"] = "gcc@4.4.7" os.environ["SPACK_SHORT_SPEC"] = "foo@1.2 arch=linux-rhel6-x86_64 /hashabc" os.environ["SPACK_CC_RPATH_ARG"] = "-Wl,-rpath," @@ -84,7 +83,6 @@ def build_environment(working_env): "SPACK_PREFIX", "SPACK_ENV_PATH", "SPACK_DEBUG_LOG_DIR", - "SPACK_COMPILER_SPEC", "SPACK_SHORT_SPEC", "SPACK_CC_RPATH_ARG", "SPACK_CXX_RPATH_ARG", diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index 0243722c495..64097eacd16 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -157,7 +157,6 @@ def wrapper_environment(working_env): SPACK_ENV_PATH="test", SPACK_DEBUG_LOG_DIR=".", SPACK_DEBUG_LOG_ID="foo-hashabc", - SPACK_COMPILER_SPEC="gcc@4.4.7", SPACK_SHORT_SPEC="foo@1.2 arch=linux-rhel6-x86_64 /hashabc", SPACK_SYSTEM_DIRS=SYSTEM_DIR_CASE_ENTRY, SPACK_MANAGED_DIRS="/path/to/spack-1/opt/spack/*|/path/to/spack-2/opt/spack/*",