diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-04-05 13:05:45 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-04-06 16:09:13 -0700 |
commit | aac67b502bb7730f9c1d54ee26d3a6ee44baa1db (patch) | |
tree | 80f3897370eb4933fea158a8564c50ae004ade89 | |
parent | 2cfa6569352bc1e0436833e5eb58ab50b508b213 (diff) | |
download | meson-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.py | 6 |
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. |