aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-09-16 16:07:54 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2018-11-02 21:39:02 +0200
commit26ff712bae08e8dfc76b3e424b0b5c2b61560158 (patch)
treef3a1a6aa20a0577a24fe1be0a598439bad5ce199
parent468d1a05ec0a020150e34fb2f0865e3971679c23 (diff)
downloadmeson-26ff712bae08e8dfc76b3e424b0b5c2b61560158.zip
meson-26ff712bae08e8dfc76b3e424b0b5c2b61560158.tar.gz
meson-26ff712bae08e8dfc76b3e424b0b5c2b61560158.tar.bz2
Fail some impossible cross-detections
Make some detections I can't see how to make work in a cross-environment fail.
-rw-r--r--mesonbuild/dependencies/base.py5
-rw-r--r--mesonbuild/dependencies/misc.py10
2 files changed, 14 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 0a02816..805c575 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -1322,6 +1322,11 @@ class ExtraFrameworkDependency(ExternalDependency):
self.link_args = ['-F' + self.path, '-framework', self.name.split('.')[0]]
def detect(self, name, path):
+ # should use the compiler to look for frameworks, rather than peering at
+ # the filesystem, so we can also find them when cross-compiling
+ if self.want_cross:
+ return
+
lname = name.lower()
if path is None:
paths = ['/System/Library/Frameworks', '/Library/Frameworks']
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index a2f7daf..cc012ac 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -278,11 +278,14 @@ class ThreadDependency(ExternalDependency):
class Python3Dependency(ExternalDependency):
def __init__(self, environment, kwargs):
super().__init__('python3', environment, None, kwargs)
+
+ if self.want_cross:
+ return
+
self.name = 'python3'
self.static = kwargs.get('static', False)
# We can only be sure that it is Python 3 at this point
self.version = '3'
- self.pkgdep = None
self._find_libpy3_windows(environment)
@classmethod
@@ -434,6 +437,11 @@ class PcapDependency(ExternalDependency):
@staticmethod
def get_pcap_lib_version(ctdep):
+ # Since we seem to need to run a program to discover the pcap version,
+ # we can't do that when cross-compiling
+ if ctdep.want_cross:
+ return None
+
v = ctdep.clib_compiler.get_return_value('pcap_lib_version', 'string',
'#include <pcap.h>', ctdep.env, [], [ctdep])
v = re.sub(r'libpcap version ', '', v)