From 254f5c920b8dd4bc4593493eb6c46fbefaa38c69 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 | 9 --------- 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, 14 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index aa698c06270..08eb27ffe96 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -39,7 +39,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 @@ -218,7 +217,6 @@ for param in $params; do if eval "test -z \"\${${param}:-}\""; then die "Spack compiler must be run from Spack! Input '$param' is missing." fi - # FIXME (compiler as nodes) add checks on whether `SPACK_XX_RPATH` is set if `SPACK_XX` is set done # eval this because SPACK_MANAGED_DIRS and SPACK_SYSTEM_DIRS are inputs we don't wanna loop over. @@ -411,13 +409,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 6307f89634b..ab337e052a6 100644 --- a/lib/spack/spack/build_systems/compiler.py +++ b/lib/spack/spack/build_systems/compiler.py @@ -273,8 +273,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 c8b61d7c1bd..472021be641 100644 --- a/lib/spack/spack/test/build_environment.py +++ b/lib/spack/spack/test/build_environment.py @@ -57,7 +57,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," @@ -83,7 +82,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 6a648cf72e4..40f2ad5c454 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -156,7 +156,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/*",