diff options
author | Sergey Senozhatsky <senozhatsky@chromium.org> | 2023-11-22 04:47:45 +0100 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-12-29 14:25:20 +0100 |
commit | 15d3f7664d2776c086f813f1efbfe2ae20a85e89 (patch) | |
tree | 6c27089f3aa55ec620fdee7b1d2c16d8eab51d84 /scripts/kconfig/symbol.c | |
parent | Add .editorconfig file for basic formatting (diff) | |
download | linux-15d3f7664d2776c086f813f1efbfe2ae20a85e89.tar.xz linux-15d3f7664d2776c086f813f1efbfe2ae20a85e89.zip |
kconfig: WERROR unmet symbol dependency
When KCONFIG_WERROR env variable is set treat unmet direct
symbol dependency as a terminal condition (error).
Suggested-by: Stefan Reinauer <reinauer@google.com>
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r-- | scripts/kconfig/symbol.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index a5a4f9153eb7..3e808528aaea 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -31,6 +31,7 @@ struct symbol symbol_no = { struct symbol *modules_sym; static tristate modules_val; +static int sym_warnings; enum symbol_type sym_get_type(struct symbol *sym) { @@ -311,6 +312,14 @@ static void sym_warn_unmet_dep(struct symbol *sym) " Selected by [m]:\n"); fputs(str_get(&gs), stderr); + sym_warnings++; +} + +bool sym_dep_errors(void) +{ + if (sym_warnings) + return getenv("KCONFIG_WERROR"); + return false; } void sym_calc_value(struct symbol *sym) |