Commit 8dceaddf by Nicolas Capens Committed by Nicolas Capens

Enable Reactor Print() in Debug/RelWithDebInfo builds

The rr::Print() functionality is intended for debugging, so it should always be available in Debug builds without having to set the CMake flag explicitly. This also helps us avoid inadvertently breaking it. Also consistently use TRUE/FALSE for Boolean values instead of a string. Bug: b/149328074 Change-Id: Iab7e0f230dcd5b42679d64ef75bf3c0a3809a0d0 Signed-off-by: 's avatarNicolas Capens <capn@google.com> Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50076 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent e4c1a25c
...@@ -554,10 +554,15 @@ if(SWIFTSHADER_WARNINGS_AS_ERRORS) ...@@ -554,10 +554,15 @@ if(SWIFTSHADER_WARNINGS_AS_ERRORS)
endif() endif()
endif() endif()
# Enable Reactor Print() functionality in Debug/RelWithDebInfo builds or when explicitly enabled.
if(CMAKE_BUILD_TYPE MATCHES "Deb")
set(REACTOR_ENABLE_PRINT TRUE)
endif()
if(REACTOR_EMIT_PRINT_LOCATION) if(REACTOR_EMIT_PRINT_LOCATION)
# This feature depends on REACTOR_EMIT_DEBUG_INFO and REACTOR_ENABLE_PRINT # This feature depends on REACTOR_EMIT_DEBUG_INFO and REACTOR_ENABLE_PRINT
set(REACTOR_EMIT_DEBUG_INFO "On") set(REACTOR_EMIT_DEBUG_INFO TRUE)
set(REACTOR_ENABLE_PRINT "On") set(REACTOR_ENABLE_PRINT TRUE)
list(APPEND SWIFTSHADER_COMPILE_OPTIONS "-DENABLE_RR_EMIT_PRINT_LOCATION") list(APPEND SWIFTSHADER_COMPILE_OPTIONS "-DENABLE_RR_EMIT_PRINT_LOCATION")
endif() endif()
......
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