diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2022-04-11 18:38:11 +0800 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-04-25 20:29:16 +0300 |
commit | 8ed151bbd786d2c52e6ea7b7cfe3147fc41ec041 (patch) | |
tree | fc2bea50d4ed0aa9bf6d706f5a3eb769f5e67a40 /mesonbuild | |
parent | 660bfa6e7c8dfb7bd8bffdb68c053e1a22945f8a (diff) | |
download | meson-8ed151bbd786d2c52e6ea7b7cfe3147fc41ec041.zip meson-8ed151bbd786d2c52e6ea7b7cfe3147fc41ec041.tar.gz meson-8ed151bbd786d2c52e6ea7b7cfe3147fc41ec041.tar.bz2 |
Visual Studio: Only use /utf-8 on VS2015 or later or clang-cl
The compiler flag only exists on Visual Studio 2015 or later, or clang-cl,
and using this always can interfere with compiler feature detection when
this flag is not supported.
So, remove '/utf-8' from always_args if we are on Visual Studio 2013 or
earlier.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/compilers/mixins/visualstudio.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py index 2f26453..0f2db73 100644 --- a/mesonbuild/compilers/mixins/visualstudio.py +++ b/mesonbuild/compilers/mixins/visualstudio.py @@ -130,6 +130,10 @@ class VisualStudioLikeCompiler(Compiler, metaclass=abc.ABCMeta): self.machine = target if mesonlib.version_compare(self.version, '>=19.28.29910'): # VS 16.9.0 includes cl 19.28.29910 self.base_options.add(mesonlib.OptionKey('b_sanitize')) + # Exclude /utf-8 in self.always_args in VS2013 and earlier + if not isinstance(self, ClangClCompiler): + if mesonlib.version_compare(self.version, '<19.00'): + self.always_args.remove('/utf-8') assert self.linker is not None self.linker.machine = self.machine |