diff options
-rw-r--r-- | mesonbuild/environment.py | 6 | ||||
-rw-r--r-- | mesonbuild/linkers.py | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index a26787c..9c969ad 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -905,11 +905,11 @@ This is probably wrong, it should always point to the native compiler.''' % evar if p.returncode == 0 and ('armar' in linker or 'armar.exe' in linker): return ArmarLinker(linker) if 'DMD32 D Compiler' in out or 'DMD64 D Compiler' in out: - return DLinker(linker, compiler.is_64, compiler.is_msvc) + return DLinker(linker, compiler.arch) if 'LDC - the LLVM D compiler' in out: - return DLinker(linker, compiler.is_64, compiler.is_msvc) + return DLinker(linker, compiler.arch) if 'GDC' in out and ' based on D ' in out: - return DLinker(linker, compiler.is_64, compiler.is_msvc) + return DLinker(linker, compiler.arch) if p.returncode == 0: return ArLinker(linker) if p.returncode == 1 and err.startswith('usage'): # OSX diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py index 30ca5d8..66586e4 100644 --- a/mesonbuild/linkers.py +++ b/mesonbuild/linkers.py @@ -139,11 +139,10 @@ class ArmarLinker(ArLinker): return False class DLinker(StaticLinker): - def __init__(self, exelist, is_64, is_msvc): + def __init__(self, exelist, arch): self.exelist = exelist self.id = exelist[0] - self.is_64 = is_64 - self.is_msvc = is_msvc + self.arch = arch def can_linker_accept_rsp(self): return mesonlib.is_windows() @@ -165,9 +164,9 @@ class DLinker(StaticLinker): def get_linker_always_args(self): if is_windows(): - if self.is_64: + if self.arch == 'x86_64': return ['-m64'] - elif self.is_msvc and self.id == 'dmd': + elif self.arch == 'x86_mscoff' and self.id == 'dmd': return ['-m32mscoff'] return ['-m32'] return [] |