From bab108742244bdfde769ea34424a0c0722a460c2 Mon Sep 17 00:00:00 2001 From: Laurin-Luis Lehning <65224843+e820@users.noreply.github.com> Date: Sun, 13 Dec 2020 15:34:50 +0100 Subject: Add support for driving lld-link indirectly through clang on Windows --- mesonbuild/linkers.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mesonbuild/linkers.py') 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): -- cgit v1.1