From 54dd926b003d4be5a4276a293777fbcc9fbdc7c5 Mon Sep 17 00:00:00 2001 From: "Yevhen Babiichuk (DustDFG)" Date: Fri, 18 Oct 2024 17:25:50 +0300 Subject: [PATCH] Warn user about unrecognized or misspelled builtin_* options. Signed-off-by: Yevhen Babiichuk (DustDFG) --- SConstruct | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SConstruct b/SConstruct index 63cff4fe167..332056ed63f 100644 --- a/SConstruct +++ b/SConstruct @@ -322,6 +322,15 @@ opts.Add("rcflags", "Custom flags for Windows resource compiler") # in following code (especially platform and custom_modules). opts.Update(env) +# Warn user about unrecognized or misspelled builtin_* options. +# Currently it works only for command line variables +# TODO: Add the same check for options defined inside profile +# file. Look at alternative profile loading approach in: +# +for key, _ in opts.UnknownVariables().items(): + if key.startswith("builtin_"): + print_warning("Unrecognized {} option. Check option name for misspelling".format(key)) + # Copy custom environment variables if set. if env["import_env_vars"]: for env_var in str(env["import_env_vars"]).split(","):