From fc5a5af7bc3619f575988a75efc0c4fe15478b2d Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Wed, 5 Sep 2018 15:16:17 +0800 Subject: oe/utils.py: Add vartrue() It can be used to simplify code like: "${@['iffalse', 'iftrue'][var]}" Signed-off-by: Robert Yang Signed-off-by: Richard Purdie --- meta/conf/bitbake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/conf') diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index faef77142a..dbadeb38aa 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -610,7 +610,7 @@ DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}" # Disabled until the option works properly -feliminate-dwarf2-dups FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}" DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe" -SELECTED_OPTIMIZATION = "${@d.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][d.getVar('DEBUG_BUILD') == '1'])}" +SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}" SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION" BUILD_OPTIMIZATION = "-O2 -pipe" -- cgit 1.2.3-korg