mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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>
This commit is contained in:
committed by
Masahiro Yamada
parent
5a602de997
commit
15d3f7664d
@@ -155,6 +155,13 @@ static void conf_message(const char *fmt, ...)
|
||||
static const char *conf_filename;
|
||||
static int conf_lineno, conf_warnings;
|
||||
|
||||
bool conf_errors(void)
|
||||
{
|
||||
if (conf_warnings)
|
||||
return getenv("KCONFIG_WERROR");
|
||||
return false;
|
||||
}
|
||||
|
||||
static void conf_warning(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
@@ -365,10 +372,9 @@ int conf_read_simple(const char *name, int def)
|
||||
char *p, *val;
|
||||
struct symbol *sym;
|
||||
int i, def_flags;
|
||||
const char *warn_unknown, *werror, *sym_name;
|
||||
const char *warn_unknown, *sym_name;
|
||||
|
||||
warn_unknown = getenv("KCONFIG_WARN_UNKNOWN_SYMBOLS");
|
||||
werror = getenv("KCONFIG_WERROR");
|
||||
if (name) {
|
||||
in = zconf_fopen(name);
|
||||
} else {
|
||||
@@ -525,9 +531,6 @@ load:
|
||||
free(line);
|
||||
fclose(in);
|
||||
|
||||
if (conf_warnings && werror)
|
||||
exit(1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user