aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/mixins
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-08-27 14:50:10 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2019-08-30 00:01:32 +0300
commit0efab591da210418e0d618449be2f9462d5d58e8 (patch)
treeb2fb1641b336c8262b1ec2e4da5d6cec12046241 /mesonbuild/compilers/mixins
parent3256e7ea63edb8508d1a2aac45da02e5c452df2c (diff)
downloadmeson-0efab591da210418e0d618449be2f9462d5d58e8.zip
meson-0efab591da210418e0d618449be2f9462d5d58e8.tar.gz
meson-0efab591da210418e0d618449be2f9462d5d58e8.tar.bz2
compilers: Move the compiler argument to proxy linker flags to the compiler class
Instead of the DynamicLinker returning a hardcoded value like `-Wl,-foo`, it now is passed a value that could be '-Wl,', or could be something '-Xlinker=' This makes a few things cleaner, and will make it possible to fix using clang (not clang-cl) on windows, where it invokes either link.exe or lld-link.exe instead of a gnu-ld compatible linker.
Diffstat (limited to 'mesonbuild/compilers/mixins')
-rw-r--r--mesonbuild/compilers/mixins/gnu.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py
index d4318b6..998b86c 100644
--- a/mesonbuild/compilers/mixins/gnu.py
+++ b/mesonbuild/compilers/mixins/gnu.py
@@ -128,6 +128,9 @@ class GnuLikeCompiler(metaclass=abc.ABCMeta):
and ICC. Certain functionality between them is different and requires
that the actual concrete subclass define their own implementation.
"""
+
+ LINKER_PREFIX = '-Wl,'
+
def __init__(self, compiler_type: 'CompilerType'):
self.compiler_type = compiler_type
self.base_options = ['b_pch', 'b_lto', 'b_pgo', 'b_sanitize', 'b_coverage',
@@ -298,6 +301,7 @@ class GnuCompiler(GnuLikeCompiler):
GnuCompiler represents an actual GCC in its many incarnations.
Compilers imitating GCC (Clang/Intel) should use the GnuLikeCompiler ABC.
"""
+
def __init__(self, compiler_type: 'CompilerType', defines: typing.Dict[str, str]):
super().__init__(compiler_type)
self.id = 'gcc'