diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-02-19 16:34:17 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-17 19:15:04 +0300 |
commit | 8396c4f3e6bfea6bbef6539055090902c089d375 (patch) | |
tree | c5bfc233e992955fe81e5e75657b74866e8b6cea /mesonbuild/compilers/c.py | |
parent | fefbb296f7100a31044fe281735bb413807680f0 (diff) | |
download | meson-8396c4f3e6bfea6bbef6539055090902c089d375.zip meson-8396c4f3e6bfea6bbef6539055090902c089d375.tar.gz meson-8396c4f3e6bfea6bbef6539055090902c089d375.tar.bz2 |
Added VS support to simd detector.
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r-- | mesonbuild/compilers/c.py | 10 |
1 files changed, 9 insertions, 1 deletions
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) + + |