aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-07-10 19:24:48 -0400
committerNirbheek Chauhan <nirbheek@centricular.com>2022-08-08 19:10:00 +0530
commitff6e6e10974262afe42af5fae5ea266c7dfeb1e7 (patch)
tree2085145bd82e89bf92a29673388c86af9b2954c4
parent79db787663168c7eb208ebc8766e765d8caa36a5 (diff)
downloadmeson-ff6e6e10974262afe42af5fae5ea266c7dfeb1e7.zip
meson-ff6e6e10974262afe42af5fae5ea266c7dfeb1e7.tar.gz
meson-ff6e6e10974262afe42af5fae5ea266c7dfeb1e7.tar.bz2
Revert /utf-8 changes in the visualstudio mixin to the 0.62.0 state
Specifically, this is a combination of the following: - Revert "visualstudio.py: Apply /utf-8 only on clang or VS2015+" This reverts commit 6e7c3efa793c25259891d3b5471343f95fb061fa. - Revert "Visual Studio: Only use /utf-8 on VS2015 or later or clang-cl" This reverts commit 8ed151bbd786d2c52e6ea7b7cfe3147fc41ec041. The changes were broken and untested, although this is because of a lack of general CI testing for all languages on Windows. At least, this broke the use of ifort, and possibly more. The changes are fundamentally a bit "exciting", as they step out of the hierarchy of compiler definitions and apply arguments almost willy-nilly. And apparently it's leaky all over the place. I don't understand all of what is going on with it, but it plainly failed to achieve its desired goal and needs to be rolled back ASAP.
-rw-r--r--mesonbuild/compilers/mixins/visualstudio.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py
index 2839f62..f4f2f1e 100644
--- a/mesonbuild/compilers/mixins/visualstudio.py
+++ b/mesonbuild/compilers/mixins/visualstudio.py
@@ -101,7 +101,9 @@ class VisualStudioLikeCompiler(Compiler, metaclass=abc.ABCMeta):
# /showIncludes is needed for build dependency tracking in Ninja
# See: https://ninja-build.org/manual.html#_deps
- always_args = ['/nologo', '/showIncludes'] # type: T.List[str]
+ # Assume UTF-8 sources by default, but self.unix_args_to_native() removes it
+ # if `/source-charset` is set too.
+ always_args = ['/nologo', '/showIncludes', '/utf-8']
warn_args = {
'0': [],
'1': ['/W2'],
@@ -115,10 +117,6 @@ class VisualStudioLikeCompiler(Compiler, metaclass=abc.ABCMeta):
self.base_options = {mesonlib.OptionKey(o) for o in ['b_pch', 'b_ndebug', 'b_vscrt']} # FIXME add lto, pgo and the like
self.target = target
self.is_64 = ('x64' in target) or ('x86_64' in target)
- # Assume UTF-8 sources by default on Visual Studio 2015 or later, or clang,
- # but self.unix_args_to_native() removes it if `/source-charset` is set too.
- if isinstance(self, ClangClCompiler) or mesonlib.version_compare(self.version, '>=19.00'):
- self.always_args = self.always_args + ['/utf-8']
# do some canonicalization of target machine
if 'x86_64' in target:
self.machine = 'x64'