Use SPIRV_PERF=1 when performance tuning.

It tells the compiler to keep frame pointers, so you have good
call stacks in your profiles.
This commit is contained in:
David Neto 2015-10-15 16:43:14 -04:00
parent 980b7cb95e
commit 005a11a4ac

View File

@ -52,6 +52,12 @@ endif()
if(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-exceptions -fno-rtti")
# For good call stacks in profiles, keep the frame pointers.
if(NOT SPIRV_PERF STREQUAL "")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer")
endif()
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
set(SPIRV_USE_SANITIZER "" CACHE STRING