delegate to cray modules for target args on cray (#17857)

This commit is contained in:
Greg Becker
2022-11-04 14:50:05 -07:00
committed by GitHub
parent fb5ff901c0
commit a88c74dc17
2 changed files with 8 additions and 2 deletions

View File

@@ -332,6 +332,10 @@ def set_compiler_environment_variables(pkg, env):
env.set("SPACK_DTAGS_TO_ADD", compiler.enable_new_dtags)
# Set the target parameters that the compiler will add
# Don't set on cray platform because the targeting module handles this
if spec.satisfies("platform=cray"):
isa_arg = ""
else:
isa_arg = spec.architecture.target.optimization_flags(compiler)
env.set("SPACK_TARGET_ARGS", isa_arg)

View File

@@ -2755,6 +2755,8 @@ def _old_concretize(self, tests=False, deprecation_warning=True):
# Check if we can produce an optimized binary (will throw if
# there are declared inconsistencies)
# No need on platform=cray because of the targeting modules
if not self.satisfies("platform=cray"):
self.architecture.target.optimization_flags(self.compiler)
def _patches_assigned(self):