From 8396c4f3e6bfea6bbef6539055090902c089d375 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 19 Feb 2017 16:34:17 +0200 Subject: Added VS support to simd detector. --- mesonbuild/compilers/c.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mesonbuild/compilers/c.py') diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index cf9d1ee..99c7cf4 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -810,7 +810,7 @@ class VisualStudioCCompiler(CCompiler): std_warn_args = ['/W3'] std_opt_args = ['/O2'] - def __init__(self, exelist, version, is_cross, exe_wrap): + def __init__(self, exelist, version, is_cross, exe_wrap, is_64): CCompiler.__init__(self, exelist, version, is_cross, exe_wrap) self.id = 'msvc' # /showIncludes is needed for build dependency tracking in Ninja @@ -820,6 +820,7 @@ class VisualStudioCCompiler(CCompiler): '2': ['/W3'], '3': ['/W4']} self.base_options = ['b_pch'] # FIXME add lto, pgo and the like + self.is_64 = True # Override CCompiler.get_always_args def get_always_args(self): @@ -1005,3 +1006,10 @@ class VisualStudioCCompiler(CCompiler): if not isinstance(args, list): args = [args] return ['/WHOLEARCHIVE:' + x for x in args] + + def get_instruction_set_args(self, instruction_set): + if self.is_64: + return vs64_instruction_set_args.get(instruction_set, None) + return vs32_instruction_set_args.get(instruction_set, None) + + -- cgit v1.1 From 181510bd6eb767361da5e02e41be08cc65b36b08 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 19 Feb 2017 20:06:49 +0200 Subject: Fix checks on MinGW and VS2010. --- mesonbuild/compilers/c.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mesonbuild/compilers/c.py') diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 99c7cf4..4aac542 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -820,7 +820,7 @@ class VisualStudioCCompiler(CCompiler): '2': ['/W3'], '3': ['/W4']} self.base_options = ['b_pch'] # FIXME add lto, pgo and the like - self.is_64 = True + self.is_64 = is_64 # Override CCompiler.get_always_args def get_always_args(self): @@ -1010,6 +1010,11 @@ class VisualStudioCCompiler(CCompiler): def get_instruction_set_args(self, instruction_set): if self.is_64: return vs64_instruction_set_args.get(instruction_set, None) + if self.version.split('.')[0] == '16' and instruction_set == 'avx': + # VS documentation says that this exists and should work, but + # it does not. The headers do not contain AVX intrinsics + # and the can not be called. + return None return vs32_instruction_set_args.get(instruction_set, None) -- cgit v1.1 From ce77fb89b991ef0537d72538ae0933b13fe09824 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 17 Jul 2017 19:40:21 +0300 Subject: Renamed test case number to avoid dupes. --- mesonbuild/compilers/c.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mesonbuild/compilers/c.py') diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 4aac542..593366a 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -25,6 +25,8 @@ from .compilers import ( msvc_buildtype_args, msvc_buildtype_linker_args, msvc_winlibs, + vs32_instruction_set_args, + vs64_instruction_set_args, ClangCompiler, Compiler, CompilerArgs, -- cgit v1.1