aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/dependencies/configtool.py3
-rw-r--r--mesonbuild/dependencies/python.py3
2 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/configtool.py b/mesonbuild/dependencies/configtool.py
index 1f16a43..87cf738 100644
--- a/mesonbuild/dependencies/configtool.py
+++ b/mesonbuild/dependencies/configtool.py
@@ -43,6 +43,7 @@ class ConfigToolDependency(ExternalDependency):
tool_name: T.Optional[str] = None
version_arg = '--version'
skip_version: T.Optional[str] = None
+ allow_default_for_cross = False
__strip_version = re.compile(r'^[0-9][0-9.]+')
def __init__(self, name: str, environment: 'Environment', kwargs: T.Dict[str, T.Any], language: T.Optional[str] = None):
@@ -85,7 +86,7 @@ class ConfigToolDependency(ExternalDependency):
best_match: T.Tuple[T.Optional[T.List[str]], T.Optional[str]] = (None, None)
for potential_bin in find_external_program(
self.env, self.for_machine, self.tool_name,
- self.tool_name, self.tools, allow_default_for_cross=False):
+ self.tool_name, self.tools, allow_default_for_cross=self.allow_default_for_cross):
if not potential_bin.found():
continue
tool = potential_bin.get_command()
diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py
index b9fbbbb..65fef7f 100644
--- a/mesonbuild/dependencies/python.py
+++ b/mesonbuild/dependencies/python.py
@@ -55,6 +55,9 @@ class Pybind11ConfigToolDependency(ConfigToolDependency):
tools = ['pybind11-config']
+ # any version of the tool is valid, since this is header-only
+ allow_default_for_cross = True
+
# pybind11 in 2.10.4 added --version, sanity-check another flag unique to it
# in the meantime
skip_version = '--pkgconfigdir'