diff options
author | Laurin-Luis Lehning <65224843+e820@users.noreply.github.com> | 2020-12-13 15:34:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-13 16:34:50 +0200 |
commit | bab108742244bdfde769ea34424a0c0722a460c2 (patch) | |
tree | 915c955f1ceb63e668a2c166be35a80f2954ff89 /mesonbuild/compilers | |
parent | b8052f9e50ce26f7f6914f0fe7d2a3b101ab14e9 (diff) | |
download | meson-bab108742244bdfde769ea34424a0c0722a460c2.zip meson-bab108742244bdfde769ea34424a0c0722a460c2.tar.gz meson-bab108742244bdfde769ea34424a0c0722a460c2.tar.bz2 |
Add support for driving lld-link indirectly through clang on Windows
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/mixins/clang.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/compilers/mixins/clang.py b/mesonbuild/compilers/mixins/clang.py index acdb352..ab2d066 100644 --- a/mesonbuild/compilers/mixins/clang.py +++ b/mesonbuild/compilers/mixins/clang.py @@ -19,7 +19,7 @@ import shutil import typing as T from ... import mesonlib -from ...linkers import AppleDynamicLinker +from ...linkers import AppleDynamicLinker, ClangClDynamicLinker from ..compilers import CompileCheckMode from .gnu import GnuLikeCompiler @@ -108,6 +108,12 @@ class ClangCompiler(GnuLikeCompiler): else: # Shouldn't work, but it'll be checked explicitly in the OpenMP dependency. return [] + + def get_win_subsystem_args(self, value: str) -> T.List[str]: + if self.info.is_windows() and not self.info.is_cygwin() and isinstance(self.linker, ClangClDynamicLinker): + return [f'-Wl,/subsystem:{value}'] + + return super().get_win_subsystem_args(value) @classmethod def use_linker_args(cls, linker: str) -> T.List[str]: |