From 825599a5106d7043379de294ff30b069724811c1 Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Thu, 16 Mar 2023 14:31:19 -0400 Subject: Windows: target arch based on spec target arch (#35797) Update packages to check Spec's target rather than the host platform. --- var/spack/repos/builtin/packages/7zip/package.py | 2 +- var/spack/repos/builtin/packages/msmpi/package.py | 3 +-- var/spack/repos/builtin/packages/perl/package.py | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/7zip/package.py b/var/spack/repos/builtin/packages/7zip/package.py index 6bccbbdf77..c33c0f2112 100644 --- a/var/spack/repos/builtin/packages/7zip/package.py +++ b/var/spack/repos/builtin/packages/7zip/package.py @@ -70,7 +70,7 @@ class _7zip(SourceforgePackage, Package): return arch def is_64bit(self): - return platform.machine().endswith("64") + return "64" in self.pkg.spec.target.family def build(self, spec, prefix): link_type = "1" if "static" in spec.variants["link_type"].value else "0" diff --git a/var/spack/repos/builtin/packages/msmpi/package.py b/var/spack/repos/builtin/packages/msmpi/package.py index de5206c20c..32adcb4aa3 100644 --- a/var/spack/repos/builtin/packages/msmpi/package.py +++ b/var/spack/repos/builtin/packages/msmpi/package.py @@ -4,7 +4,6 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os -import platform import re import sys @@ -58,7 +57,7 @@ class GenericBuilder(GenericBuilder): env.set("SPACK_IFORT", ifort_root) def is_64bit(self): - return platform.machine().endswith("64") + return "64" in self.pkg.spec.target.family def build_command_line(self): args = ["-noLogo"] diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index a0f534b74d..73f856f4fe 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -12,7 +12,6 @@ # Date: September 6, 2015 # import os -import platform import re import sys from contextlib import contextmanager @@ -227,7 +226,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package return args def is_64bit(self): - return platform.machine().endswith("64") + return "64" in self.pkg.spec.target.family def configure_args(self): spec = self.spec -- cgit v1.2.3-60-g2f50