aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.