aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-03-26 01:45:59 +0200
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2019-03-27 14:15:12 +0000
commit30c5ec7c23a5245a332eab2a78bb2fcc2b1efbd9 (patch)
tree3391495ca5054d698a3f6e37a7f1d686e9a8e0f0
parent1e7ce3553b4b96e63935ab064b8e1114fa78cc84 (diff)
downloadmeson-30c5ec7c23a5245a332eab2a78bb2fcc2b1efbd9.zip
meson-30c5ec7c23a5245a332eab2a78bb2fcc2b1efbd9.tar.gz
meson-30c5ec7c23a5245a332eab2a78bb2fcc2b1efbd9.tar.bz2
Fail gracefully for Apple frameworks with a non-Clang compiler. Closes #5070.
-rw-r--r--mesonbuild/dependencies/base.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 4e61f4c..d2f863c 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -2190,7 +2190,15 @@ class ExtraFrameworkDependency(ExternalDependency):
if not self.clib_compiler:
raise DependencyException('No C-like compilers are available')
if self.system_framework_paths is None:
- self.system_framework_paths = self.clib_compiler.find_framework_paths(self.env)
+ try:
+ self.system_framework_paths = self.clib_compiler.find_framework_paths(self.env)
+ except MesonException as e:
+ if 'non-clang' in str(e):
+ # Apple frameworks can only be found (and used) with the
+ # system compiler. It is not available so bail immediately.
+ self.is_found = False
+ return
+ raise
self.detect(name, paths)
def detect(self, name, paths):