Fail some impossible cross-detections

Make some detections I can't see how to make work in a cross-environment
fail.
pull/4394/merge
Jon Turney 6 years ago committed by Jussi Pakkanen
parent 468d1a05ec
commit 26ff712bae
  1. 5
      mesonbuild/dependencies/base.py
  2. 10
      mesonbuild/dependencies/misc.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']

@ -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)

Loading…
Cancel
Save