From 0efab591da210418e0d618449be2f9462d5d58e8 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 27 Aug 2019 14:50:10 -0700 Subject: 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. --- mesonbuild/compilers/swift.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mesonbuild/compilers/swift.py') diff --git a/mesonbuild/compilers/swift.py b/mesonbuild/compilers/swift.py index 6c639fd..e429056 100644 --- a/mesonbuild/compilers/swift.py +++ b/mesonbuild/compilers/swift.py @@ -27,6 +27,9 @@ swift_optimization_args = {'0': [], } class SwiftCompiler(Compiler): + + LINKER_PREFIX = ['-Xlinker'] + def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, **kwargs): self.language = 'swift' super().__init__(exelist, version, for_machine, **kwargs) -- cgit v1.1