From cc8b56322bb04569a5adf944774b16862782c95b Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Tue, 18 Apr 2017 15:16:05 +0100 Subject: Add `ENABLE_ASSERTIONS` build option Add the new build option `ENABLE_ASSERTIONS` that controls whether or not assert functions are compiled out. It defaults to 1 for debug builds and to 0 for release builds. Additionally, a following patch will be done to allow this build option to hide auxiliary code used for the checks done in an `assert()`. This code is is currently under the DEBUG build flag. Assert messages are now only printed if LOG_LEVEL >= LOG_LEVEL_INFO, which is the default for debug builds. This patch also updates the User Guide. Change-Id: I1401530b56bab25561bb0f274529f1d12c5263bc Signed-off-by: Antonio Nino Diaz --- docs/user-guide.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/user-guide.md') diff --git a/docs/user-guide.md b/docs/user-guide.md index a1df9652..af083605 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -286,6 +286,14 @@ performed. payload. Please refer to the "Booting an EL3 payload" section for more details. +* `ENABLE_ASSERTIONS`: This option controls whether or not calls to `assert()` + are compiled out. For debug builds, this option defaults to 1, and calls to + `assert()` are left in place. For release builds, this option defaults to 0 + and calls to `assert()` function are compiled out. This option can be set + independently of `DEBUG`. It can also be used to hide any auxiliary code + that is only required for the assertion and does not fit in the assertion + itself. + * `ENABLE_PMF`: Boolean option to enable support for optional Performance Measurement Framework(PMF). Default is 0. -- cgit v1.2.3