From a872b925ea41be3e6beffeb934030068c0d83be9 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Tue, 30 Oct 2018 20:25:50 +0000 Subject: Store the target architecture for CL-like compilers Store the MSVC compiler target architecture ('x86', 'x64' or 'ARM' (this is ARM64, I believe)), rather than just if it's x64 or not. The regex used for target architecture should be ok, based on this list of [1] version outputs, but we assume x86 if no match, for safety's sake. [1] https://stackoverflow.com/a/1233332/1951600 Also detect arch even if cl outputs version to stdout. Ditto for clang-cl Future work: is_64 is now only used in get_instruction_set_args() --- mesonbuild/compilers/cpp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 87371c0a7..d702e83a6 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -308,9 +308,9 @@ class IntelCPPCompiler(IntelCompiler, CPPCompiler): class VisualStudioCPPCompiler(VisualStudioCCompiler, CPPCompiler): - def __init__(self, exelist, version, is_cross, exe_wrap, is_64): + def __init__(self, exelist, version, is_cross, exe_wrap, target): CPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap) - VisualStudioCCompiler.__init__(self, exelist, version, is_cross, exe_wrap, is_64) + VisualStudioCCompiler.__init__(self, exelist, version, is_cross, exe_wrap, target) self.base_options = ['b_pch', 'b_vscrt'] # FIXME add lto, pgo and the like def get_options(self): @@ -387,8 +387,8 @@ class VisualStudioCPPCompiler(VisualStudioCCompiler, CPPCompiler): return VisualStudioCCompiler.get_compiler_check_args(self) class ClangClCPPCompiler(VisualStudioCPPCompiler, ClangClCCompiler): - def __init__(self, exelist, version, is_cross, exe_wrap, is_64): - VisualStudioCPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap, is_64) + def __init__(self, exelist, version, is_cross, exe_wrap, target): + VisualStudioCPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap, target) self.id = 'clang-cl' class ArmCPPCompiler(ArmCompiler, CPPCompiler): -- cgit v1.2.3