summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn W. Parent <45471568+johnwparent@users.noreply.github.com>2023-03-16 14:31:19 -0400
committerGitHub <noreply@github.com>2023-03-16 11:31:19 -0700
commit825599a5106d7043379de294ff30b069724811c1 (patch)
tree60de6c0af2a1c41b887f4a4932a213876c2dcc3b
parent4f6f1b620fb5e0882ffd6ca527d71abb754eccc0 (diff)
downloadspack-825599a5106d7043379de294ff30b069724811c1.tar.gz
spack-825599a5106d7043379de294ff30b069724811c1.tar.bz2
spack-825599a5106d7043379de294ff30b069724811c1.tar.xz
spack-825599a5106d7043379de294ff30b069724811c1.zip
Windows: target arch based on spec target arch (#35797)
Update packages to check Spec's target rather than the host platform.
-rw-r--r--var/spack/repos/builtin/packages/7zip/package.py2
-rw-r--r--var/spack/repos/builtin/packages/msmpi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/perl/package.py3
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