diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-07-10 19:24:48 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-07-11 17:58:02 -0400 |
commit | 46793145ba172abb80cc69c828505b071b62685e (patch) | |
tree | 9de00082d9f8ceccfd755fd3f845fb649808760d | |
parent | 1521bdd9fd42ef216f3c3cee4a9c6124e131143e (diff) | |
download | meson-46793145ba172abb80cc69c828505b071b62685e.zip meson-46793145ba172abb80cc69c828505b071b62685e.tar.gz meson-46793145ba172abb80cc69c828505b071b62685e.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.py | 8 |
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' |