diff options
author | L. E. Segovia <amy@amyspark.me> | 2023-08-21 12:03:26 -0300 |
---|---|---|
committer | L. E. Segovia <amy@amyspark.me> | 2024-02-25 10:48:44 -0300 |
commit | a33c599f783d963ad2b04eb9bda76bdd38ad9234 (patch) | |
tree | 236995161c9b8467709a3e6f946dba42e058f100 /mesonbuild/linkers/linkers.py | |
parent | 05f4e0d6c5e74d5dfc1f1b32ac2ee26af664c950 (diff) | |
download | meson-a33c599f783d963ad2b04eb9bda76bdd38ad9234.zip meson-a33c599f783d963ad2b04eb9bda76bdd38ad9234.tar.gz meson-a33c599f783d963ad2b04eb9bda76bdd38ad9234.tar.bz2 |
linkers: Fix detection of link arguments to Clang(-cl) + MSVC
Currently, not only Meson lacks a way to induce a "--fatal-warnings" on
LINK.exe, it is also unable to pass flags appropriately when using
clang-cl or Microsoft's stock clang.
This commit fixes it by implementing `fatal_warnings()` in the
MSVCDynamicLinker and ClangCLDynamicLinker classes, and by implementing
the requisite conversion steps in linker_to_compiler_args for
ClangCompiler.
Diffstat (limited to 'mesonbuild/linkers/linkers.py')
-rw-r--r-- | mesonbuild/linkers/linkers.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py index e4db015..a807b7b 100644 --- a/mesonbuild/linkers/linkers.py +++ b/mesonbuild/linkers/linkers.py @@ -1313,6 +1313,9 @@ class MSVCDynamicLinker(VisualStudioLikeLinkerMixin, DynamicLinker): def get_win_subsystem_args(self, value: str) -> T.List[str]: return self._apply_prefix([f'/SUBSYSTEM:{value.upper()}']) + def fatal_warnings(self) -> T.List[str]: + return ['-WX'] + class ClangClDynamicLinker(VisualStudioLikeLinkerMixin, DynamicLinker): @@ -1342,6 +1345,9 @@ class ClangClDynamicLinker(VisualStudioLikeLinkerMixin, DynamicLinker): def get_thinlto_cache_args(self, path: str) -> T.List[str]: return ["/lldltocache:" + path] + def fatal_warnings(self) -> T.List[str]: + return ['-WX'] + class XilinkDynamicLinker(VisualStudioLikeLinkerMixin, DynamicLinker): |