Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn if a symbol with unsatisfied deps is selected
Mirrors a warning in the C implementation. Make it a bit more informative and simpler to decode for people who aren't super familiar with Kconfig. The warning is printed when/if the symbol is evaluated, e.g. when writing a .config or C header or accessing Symbol.str/tri_value. It is not printed if the symbol value has already been calculated and is cached and up-to-date, which avoids warning spam. Example: config Y_SYMBOL_1 def_bool y config Y_SYMBOL_2 def_bool y config SELECTED bool depends on !Y_SYMBOL_1 config SELECTING_1 def_bool y select SELECTED # Skipped in warning, because n config SELECTING_2 def_bool n select SELECTED config SELECTING_3 def_bool y select SELECTED if Y_SYMBOL_1 depends on Y_SYMBOL_2 # Defined in multiple locations config SELECTING_3 Generated warning: warning: SELECTED (defined at Kconfig:7) has unsatisfied direct dependencies (!Y_SYMBOL_1), but is currently being selected by the following symbols: SELECTING_3 (value: y, defined at Kconfig:20, Kconfig:26), with direct dependencies "y" (value: y) and select condition Y_SYMBOL_1 && Y_SYMBOL_2 (value: y) SELECTING_1 (value: y, defined at Kconfig:11), with direct dependencies "y" (value: y) Real-world example from test suite: warning: NOT_COHERENT_CACHE (defined at arch/powerpc/platforms/Kconfig.cputype:381) has unsatisfied direct dependencies (4xx || PPC_8xx || E200 || PPC_MPC512x || GAMECUBE_COMMON), but is currently being selected by the following symbols: AMIGAONE (value: y, defined at arch/powerpc/platforms/amigaone/Kconfig:2), with direct dependencies 6xx && BROKEN_ON_SMP (value: y) and select condition 6xx && BROKEN_ON_SMP (value: y)
- Loading branch information