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
pull/8625/head
Dylan Baker 4 years ago
parent 2cfa656935
commit aac67b502b
  1. 6
      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.

Loading…
Cancel
Save