aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-03-19 19:19:29 +0200
committerGitHub <noreply@github.com>2020-03-19 19:19:29 +0200
commit321774d715f47b3bd3a2e240e0a190dfad7bd22d (patch)
tree0c9f22d4cee7c1d3a85dde4694b0739d1e4e916f /mesonbuild/compilers
parent00104b1081cd5076451d83524f4f9bfa75750cf6 (diff)
parentb8294b4436f7a187cd8cfae02554ce0140428e78 (diff)
downloadmeson-321774d715f47b3bd3a2e240e0a190dfad7bd22d.zip
meson-321774d715f47b3bd3a2e240e0a190dfad7bd22d.tar.gz
meson-321774d715f47b3bd3a2e240e0a190dfad7bd22d.tar.bz2
Merge pull request #6789 from dcbaker/deprecated-c-ld
Make linker selection environment variables match docs
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/mixins/gnu.py4
-rw-r--r--mesonbuild/compilers/mixins/visualstudio.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py
index ae4b7db..4c8ca0b 100644
--- a/mesonbuild/compilers/mixins/gnu.py
+++ b/mesonbuild/compilers/mixins/gnu.py
@@ -304,6 +304,10 @@ class GnuLikeCompiler(metaclass=abc.ABCMeta):
@classmethod
def use_linker_args(cls, linker: str) -> T.List[str]:
+ if linker not in {'gold', 'bfd', 'lld'}:
+ raise mesonlib.MesonException(
+ 'Unsupported linker, only bfd, gold, and lld are supported, '
+ 'not {}.'.format(linker))
return ['-fuse-ld={}'.format(linker)]
diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py
index 44aefc8..d0004ce 100644
--- a/mesonbuild/compilers/mixins/visualstudio.py
+++ b/mesonbuild/compilers/mixins/visualstudio.py
@@ -366,10 +366,6 @@ class VisualStudioLikeCompiler(metaclass=abc.ABCMeta):
def get_argument_syntax(self) -> str:
return 'msvc'
- @classmethod
- def use_linker_args(cls, linker: str) -> T.List[str]:
- return []
-
class MSVCCompiler(VisualStudioLikeCompiler):