aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-05-04 23:21:40 +0200
committerGitHub <noreply@github.com>2017-05-04 23:21:40 +0200
commit11968382a3800f7dd6d04b3a94d4351f0950dd9a (patch)
tree3f77f862dd1605173630074f674ec38cd0959b43 /mesonbuild/build.py
parenta576791064b92bfe44c958648eee64f55e87b23d (diff)
parent4bee51655bea9c8bebd3c55414d7daf13591fb59 (diff)
downloadmeson-11968382a3800f7dd6d04b3a94d4351f0950dd9a.zip
meson-11968382a3800f7dd6d04b3a94d4351f0950dd9a.tar.gz
meson-11968382a3800f7dd6d04b3a94d4351f0950dd9a.tar.bz2
Merge pull request #1621 from dcbaker/llvm-dep
RFC: Add dependency for LLVM. Fixes #1611
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 7dc0bc7..06e6156 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -908,7 +908,14 @@ You probably should put it in link_with instead.''')
# Pick a compiler based on the language priority-order
for l in clike_langs:
if l in self.compilers or l in dep_langs:
- return all_compilers[l]
+ try:
+ return all_compilers[l]
+ except KeyError:
+ raise MesonException(
+ 'Could not get a dynamic linker for build target {!r}. '
+ 'Requires a linker for language "{}", but that is not '
+ 'a project language.'.format(self.name, l))
+
m = 'Could not get a dynamic linker for build target {!r}'
raise AssertionError(m.format(self.name))