aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2017-06-17 15:04:26 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2017-06-17 12:34:26 +0300
commit73c06780f93f7565a39def7ed08e404fbcaae358 (patch)
tree35755bbdb42e8b4e69878e1c0acd7c835780d4c6 /mesonbuild
parentf1996f7291f9735f80b94b3893832829273c906c (diff)
downloadmeson-73c06780f93f7565a39def7ed08e404fbcaae358.zip
meson-73c06780f93f7565a39def7ed08e404fbcaae358.tar.gz
meson-73c06780f93f7565a39def7ed08e404fbcaae358.tar.bz2
Make external library no-op when used with incompatible target (#1941)
* tests: Add a test for C library in Vala target https://github.com/mesonbuild/meson/issues/1939 * Make external library no-op when used with incompatible target This is how it used to behave earlier, but we accidentally regressed Closes https://github.com/mesonbuild/meson/issues/1939
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/dependencies/base.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 14ec41e..fdb5ab8 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -528,7 +528,10 @@ class ExternalLibrary(ExternalDependency):
C-like code. Note that C++ libraries *can* be linked with C code with
a C++ linker (and vice-versa).
'''
- if self.language == 'vala' and language != 'vala':
+ # Using a vala library in a non-vala target, or a non-vala library in a vala target
+ # XXX: This should be extended to other non-C linkers such as Rust
+ if (self.language == 'vala' and language != 'vala') or \
+ (language == 'vala' and self.language != 'vala'):
return []
return self.link_args