Windows: target arch based on spec target arch (#35797)

Update packages to check Spec's target rather than the host platform.
This commit is contained in:
John W. Parent 2023-03-16 14:31:19 -04:00 committed by GitHub
parent 4f6f1b620f
commit 825599a510
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View file

@ -70,7 +70,7 @@ def plat_arch(self):
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"

View file

@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import platform
import re
import sys
@ -58,7 +57,7 @@ def setup_build_environment(self, env):
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"]

View file

@ -12,7 +12,6 @@
# Date: September 6, 2015
#
import os
import platform
import re
import sys
from contextlib import contextmanager
@ -227,7 +226,7 @@ def nmake_arguments(self):
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