From ca89d02ca1639b72c7b74834ff432ab10df58fe9 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Fri, 20 Jul 2018 04:14:31 +0200 Subject: Add KCONFIG_STRICT flag for flagging refs. to undefined syms Settings KCONFIG_STRICT to y in the environment turns on warnings for all references to undefined symbols within Kconfig files (with the only gotcha that hex literals must be prefixed by 0x or 0X, to make it possible to distinguish them from undefined references). Always flagging undefined references gets awkward, as some projects (e.g. the Linux kernel) use multiple Kconfig trees with shared files, leading to some safe undefined references. It's helpful for other projects though. Having KCONFIG_STRICT as an environment variable is handy when multiple tools are involved. Piggyback a small README change re. warnings. Kconfiglib now has many more warnings than the C tools. --- tests/Kstrict | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/Kstrict (limited to 'tests') diff --git a/tests/Kstrict b/tests/Kstrict new file mode 100644 index 0000000..463a1c8 --- /dev/null +++ b/tests/Kstrict @@ -0,0 +1,16 @@ +config DEF + bool + +config BOOL + bool "foo" if DEF || !UNDEF_1 + default UNDEF_2 + +config INT + int + range UNDEF_2 8 + +menu "menu" + depends on UNDEF_1 + visible if UNDEF_3 + +endmenu -- cgit v1.2.3