]> git.baikalelectronics.ru Git - uboot.git/commit
kconfig: Add tools support to CONFIG_IS_ENABLED()
authorSimon Glass <sjg@chromium.org>
Sun, 26 Sep 2021 01:43:15 +0000 (19:43 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 8 Oct 2021 19:53:26 +0000 (15:53 -0400)
commita1f30df2d00bf8717bdfe68d771a1900c9dd94e6
tree926aea388b6644d5ccae728108e9961b95533e88
parentd596bee7c8fce5142fe8db1f51bc9e4823ef3681
kconfig: Add tools support to CONFIG_IS_ENABLED()

At present we must separately test for the host build for many options,
since we force them to be enabled. For example, CONFIG_FIT is always
enabled in the host tools, even if CONFIG_FIT is not enabled by the
board itself.

It would be more convenient if we could use, for example,
CONFIG_IS_ENABLED(FIT) and get CONFIG_HOST_FIT, when building for the
host. Add support for this.

With this and the tools_build() function, we should be able to remove all
the #ifdefs currently needed in code that is build by tools and targets.

This will be even nicer when we move to using CONFIG(xxx) everywhere,
since all the #ifdef and IS_ENABLED/CONFIG_IS_ENABLED stuff will go away.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> # a3e8a443
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
include/linux/kconfig.h