aboutsummaryrefslogtreecommitdiff
path: root/tools/build_system
diff options
context:
space:
mode:
authorChris Kay <chris.kay@arm.com>2019-12-04 15:05:28 +0000
committerjimqui01 <54316584+jimqui01@users.noreply.github.com>2020-03-24 17:52:55 +0000
commit819690283526d1d768dcea49b47bdb51c1de6e55 (patch)
treea5898c26831a3b81518682e81b72d5cd2611d356 /tools/build_system
parent26a32af3ecb7d92c05e2114423b25f4c203ed193 (diff)
fwk: Filter log messages by level
This commit introduces the ability to filter logs based on their criticality. Log messages that do not exceed the configured criticality are removed at preprocessing time. This, in turn, allows us to remove logging calls that do not meet the criticality requirement, reducing the size of the executable image and increasing the performance of release images. Change-Id: I56e14175b67a3e4e68fd03b8e457a802192898d1 Signed-off-by: Chris Kay <chris.kay@arm.com>
Diffstat (limited to 'tools/build_system')
-rw-r--r--tools/build_system/rules.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/build_system/rules.mk b/tools/build_system/rules.mk
index 5df987da..a760d1e3 100644
--- a/tools/build_system/rules.mk
+++ b/tools/build_system/rules.mk
@@ -143,16 +143,19 @@ BUILTIN_LIBS_GCC := -lc -lgcc
ifeq ($(MODE),release)
O ?= $(DEFAULT_OPT_GCC_RELEASE)
+ LOG_LEVEL ?= $(DEFAULT_LOG_LEVEL_RELEASE)
# Disable assertions in release mode
DEFINES += NDEBUG
-
else
O ?= $(DEFAULT_OPT_GCC_DEBUG)
+ LOG_LEVEL ?= $(DEFAULT_LOG_LEVEL_DEBUG)
DEFINES += BUILD_MODE_DEBUG
endif
+DEFINES += FWK_LOG_LEVEL=FWK_LOG_LEVEL_$(LOG_LEVEL)
+
ifeq ($(BUILD_HAS_DEBUGGER),yes)
DEFINES += BUILD_HAS_DEBUGGER
endif