aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/linkers.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-11-25 14:20:58 -0800
committerDylan Baker <dylan@pnwbakers.com>2019-12-12 10:57:27 -0800
commit47dfe34c8517747d51ef063474e3594c487fde82 (patch)
tree5f17ce21d886962533f48ffce024d451ccbb8ae7 /mesonbuild/linkers.py
parent87766b37276164eaf359c9e99522dcd6a53be180 (diff)
downloadmeson-47dfe34c8517747d51ef063474e3594c487fde82.zip
meson-47dfe34c8517747d51ef063474e3594c487fde82.tar.gz
meson-47dfe34c8517747d51ef063474e3594c487fde82.tar.bz2
Consider compiler arguments in linker detection logic
If a user passes -fuse-ld=gold to gcc or clang, they expect that they'll get ld.gold, not whatever the default is. Meson currently doesn't do that, because it doesn't pass these arguments to the linker detection logic. This patch fixes that. Another case that this is needed is with clang's --target option This is a bad solution, honestly, and it would be better to use $LD or a cross/native file but this is needed for backwards compatability. Fixes #6057
Diffstat (limited to 'mesonbuild/linkers.py')
-rw-r--r--mesonbuild/linkers.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py
index ab532a4..4dae5eb 100644
--- a/mesonbuild/linkers.py
+++ b/mesonbuild/linkers.py
@@ -344,10 +344,6 @@ class DynamicLinker(metaclass=abc.ABCMeta):
raise mesonlib.EnvironmentException(
'Linker {} does not support allow undefined'.format(self.id))
- def invoked_by_compiler(self) -> bool:
- """True if meson uses the compiler to invoke the linker."""
- return True
-
@abc.abstractmethod
def get_output_args(self, outname: str) -> typing.List[str]:
pass
@@ -468,10 +464,6 @@ class GnuLikeDynamicLinkerMixin:
return []
return ['-fsanitize=' + value]
- def invoked_by_compiler(self) -> bool:
- """True if meson uses the compiler to invoke the linker."""
- return True
-
def get_coverage_args(self) -> typing.List[str]:
return ['--coverage']
@@ -787,7 +779,6 @@ class VisualStudioLikeLinkerMixin:
def __init__(self, *args, direct: bool = True, machine: str = 'x86', **kwargs):
super().__init__(*args, **kwargs)
- self.direct = direct
self.machine = machine
def invoked_by_compiler(self) -> bool: