aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/linkers.py
diff options
context:
space:
mode:
authorLaurin-Luis Lehning <65224843+e820@users.noreply.github.com>2020-12-13 15:34:50 +0100
committerGitHub <noreply@github.com>2020-12-13 16:34:50 +0200
commitbab108742244bdfde769ea34424a0c0722a460c2 (patch)
tree915c955f1ceb63e668a2c166be35a80f2954ff89 /mesonbuild/linkers.py
parentb8052f9e50ce26f7f6914f0fe7d2a3b101ab14e9 (diff)
downloadmeson-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/linkers.py')
-rw-r--r--mesonbuild/linkers.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py
index 589945c..967e465 100644
--- a/mesonbuild/linkers.py
+++ b/mesonbuild/linkers.py
@@ -1164,6 +1164,14 @@ class ClangClDynamicLinker(VisualStudioLikeLinkerMixin, DynamicLinker):
super().__init__(exelist or ['lld-link.exe'], for_machine,
prefix, always_args, machine=machine, version=version, direct=direct)
+ def get_output_args(self, outputname: str) -> T.List[str]:
+ # If we're being driven indirectly by clang just skip /MACHINE
+ # as clang's target triple will handle the machine selection
+ if self.machine is None:
+ return self._apply_prefix([f"/OUT:{outputname}"])
+
+ return super().get_output_args(outputname)
+
class XilinkDynamicLinker(VisualStudioLikeLinkerMixin, DynamicLinker):