Commit 8d25208f by Greg Hartman

Turn off tracing on the release build

Change-Id: I5e850a2c874a4273d5b85897379f3e16ba00b276 Reviewed-on: https://swiftshader-review.googlesource.com/3160Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarGreg Hartman <ghartman@google.com>
parent dcf1d858
...@@ -73,15 +73,15 @@ LOCAL_SRC_FILES += \ ...@@ -73,15 +73,15 @@ LOCAL_SRC_FILES += \
OpenGL/common/Object.cpp \ OpenGL/common/Object.cpp \
OpenGL/common/MatrixStack.cpp \ OpenGL/common/MatrixStack.cpp \
LOCAL_CFLAGS += -DLOG_TAG=\"swiftshader\" -Wno-unused-parameter LOCAL_CFLAGS += -DLOG_TAG=\"swiftshader\" -Wno-unused-parameter -DDISPLAY_LOGO=0
LOCAL_CFLAGS += -fno-operator-names -msse2 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS LOCAL_CFLAGS += -fno-operator-names -msse2 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
LOCAL_CFLAGS += -std=c++11 LOCAL_CFLAGS += -std=c++11
# Android's make system also uses NDEBUG, so we need to set/unset it forcefully # Android's make system also uses NDEBUG, so we need to set/unset it forcefully
# Uncomment for ON: # Uncomment for ON:
LOCAL_CFLAGS += -UNDEBUG -g -O0 # LOCAL_CFLAGS += -UNDEBUG -g -O0
# Uncomment for OFF: # Uncomment for OFF:
#LOCAL_CFLAGS += -fomit-frame-pointer -ffunction-sections -fdata-sections -DANGLE_DISABLE_TRACE LOCAL_CFLAGS += -fomit-frame-pointer -ffunction-sections -fdata-sections -DANGLE_DISABLE_TRACE
LOCAL_C_INCLUDES += \ LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/OpenGL/include \ $(LOCAL_PATH)/OpenGL/include \
......
...@@ -28,8 +28,10 @@ void AndroidEnterDebugger() ...@@ -28,8 +28,10 @@ void AndroidEnterDebugger()
void trace(const char *format, ...) void trace(const char *format, ...)
{ {
#ifndef NDEBUG
va_list vararg; va_list vararg;
va_start(vararg, format); va_start(vararg, format);
android_vprintLog(ANDROID_LOG_VERBOSE, NULL, LOG_TAG, format, vararg); android_vprintLog(ANDROID_LOG_VERBOSE, NULL, LOG_TAG, format, vararg);
va_end(vararg); va_end(vararg);
#endif
} }
...@@ -403,7 +403,7 @@ LOCAL_CFLAGS += -std=c++11 ...@@ -403,7 +403,7 @@ LOCAL_CFLAGS += -std=c++11
# Android's make system also uses NDEBUG, so we need to set/unset it forcefully # Android's make system also uses NDEBUG, so we need to set/unset it forcefully
# Uncomment for debug ON: # Uncomment for debug ON:
LOCAL_CFLAGS += -UNDEBUG -g -O0 # LOCAL_CFLAGS += -UNDEBUG -g -O0
LOCAL_C_INCLUDES += \ LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/include-android \ $(LOCAL_PATH)/include-android \
......
...@@ -45,9 +45,9 @@ LOCAL_CFLAGS += -DLOG_TAG=\"swiftshader_compiler\" -Wno-unused-parameter ...@@ -45,9 +45,9 @@ LOCAL_CFLAGS += -DLOG_TAG=\"swiftshader_compiler\" -Wno-unused-parameter
# Android's make system also uses NDEBUG, so we need to set/unset it forcefully # Android's make system also uses NDEBUG, so we need to set/unset it forcefully
# Uncomment for ON: # Uncomment for ON:
LOCAL_CFLAGS += -UNDEBUG -g -O0 # LOCAL_CFLAGS += -UNDEBUG -g -O0
# Uncomment for OFF: # Uncomment for OFF:
#LOCAL_CFLAGS += -fomit-frame-pointer -ffunction-sections -fdata-sections -DANGLE_DISABLE_TRACE LOCAL_CFLAGS += -fomit-frame-pointer -ffunction-sections -fdata-sections -DANGLE_DISABLE_TRACE
LOCAL_CFLAGS += -fno-operator-names -msse2 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS LOCAL_CFLAGS += -fno-operator-names -msse2 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
LOCAL_CFLAGS += -std=c++11 LOCAL_CFLAGS += -std=c++11
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment