Compile out contents of DebugLog when building in release mode.

PiperOrigin-RevId: 323637922
Change-Id: Icaa8cb1eb5738c75af696f53756377db236aac85
This commit is contained in:
A. Unique TensorFlower 2020-07-28 13:11:46 -07:00 committed by TensorFlower Gardener
parent 6c9fad23bf
commit 36f3e515a4
2 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,7 @@ limitations under the License.
#include "am_util.h" // NOLINT
extern "C" void DebugLog(const char* s) {
#ifndef TF_LITE_STRIP_ERROR_STRINGS
static bool is_initialized = false;
if (!is_initialized) {
am_bsp_itm_printf_enable();
@ -48,4 +49,5 @@ extern "C" void DebugLog(const char* s) {
}
am_util_stdio_printf("%s", s);
#endif
}

View File

@ -23,6 +23,7 @@ limitations under the License.
#include "am_util.h" // NOLINT
extern "C" void DebugLog(const char* s) {
#ifndef TF_LITE_STRIP_ERROR_STRINGS
static bool is_initialized = false;
if (!is_initialized) {
am_bsp_uart_printf_enable();
@ -30,4 +31,5 @@ extern "C" void DebugLog(const char* s) {
}
am_util_stdio_printf("%s", s);
#endif
}