aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Yhuel <loic.yhuel@softathome.com>2022-11-24 13:19:59 +0100
committerEli Schwartz <eschwartz93@gmail.com>2022-11-24 21:38:44 -0500
commit11fe8f11579d46870ed340dca8234ea35edf769c (patch)
tree12cbdb071f78ea6bfb5c45ce5fa834aef12bb392
parente85138fcc8373f925709124f8586a6feecf968d1 (diff)
downloadmeson-11fe8f11579d46870ed340dca8234ea35edf769c.zip
meson-11fe8f11579d46870ed340dca8234ea35edf769c.tar.gz
meson-11fe8f11579d46870ed340dca8234ea35edf769c.tar.bz2
Ignore unused compiler options for "meson configure"
"meson setup" ignores unused compiler options, like "cpp_args" on a project without C++. "meson configure" doesn't have the filtering from "set_default_options", so it fails with : ERROR: Unknown options: "cpp_args" So now unused compiler options (ie not in coredata.options) are no longer marked unknown. Fixes: #11060
-rw-r--r--mesonbuild/coredata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index cdbf3c04..e94c02a 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -821,7 +821,7 @@ class CoreData:
continue
elif k in self.options:
self.set_option(k, v)
- elif k.machine != MachineChoice.BUILD:
+ elif k.machine != MachineChoice.BUILD and k.type != OptionType.COMPILER:
unknown_options.append(k)
if unknown_options:
unknown_options_str = ', '.join(sorted(str(s) for s in unknown_options))