aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-04-05 13:05:45 -0700
committerDylan Baker <dylan@pnwbakers.com>2021-04-06 16:09:13 -0700
commitaac67b502bb7730f9c1d54ee26d3a6ee44baa1db (patch)
tree80f3897370eb4933fea158a8564c50ae004ade89
parent2cfa6569352bc1e0436833e5eb58ab50b508b213 (diff)
downloadmeson-aac67b502bb7730f9c1d54ee26d3a6ee44baa1db.zip
meson-aac67b502bb7730f9c1d54ee26d3a6ee44baa1db.tar.gz
meson-aac67b502bb7730f9c1d54ee26d3a6ee44baa1db.tar.bz2
coredata: Check for built-in options as host options
These options often don't exist for the build machine, as they're generally invalid (ie, prefix, libdir, etc). So we should always check for their existance as host optiuons, since all we want to know in this case is if the option is yeilding (valid per-subproject), and build/vs host doesn't matter in that cases: Fixes #8613
-rw-r--r--mesonbuild/coredata.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 27cb81e..64f65b2 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -759,7 +759,11 @@ class CoreData:
if k.subproject and k.subproject != subproject:
continue
# If the option is a builtin and is yielding then it's not allowed per subproject.
- if subproject and k.is_builtin() and self.options[k.as_root()].yielding:
+ #
+ # Always test this using the HOST machine, as many builtin options
+ # are not valid for the BUILD machine, but the yielding value does
+ # not differ between them even when they are valid for both.
+ if subproject and k.is_builtin() and self.options[k.evolve(subproject='', machine=MachineChoice.HOST)].yielding:
continue
# Skip base, compiler, and backend options, they are handled when
# adding languages and setting backend.