mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[CMake] Add -O1 in debug builds with LLVM_USE_SANITIZER
llvm-svn: 189747
This commit is contained in:
parent
6009a9c268
commit
2c12d4855f
@ -240,6 +240,10 @@ macro(append_common_sanitizer_flags)
|
||||
NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
|
||||
add_flag_if_supported("-gline-tables-only")
|
||||
endif()
|
||||
# Use -O1 even in debug mode, otherwise sanitizers slowdown is too large.
|
||||
if (uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
|
||||
add_flag_if_supported("-O1")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Turn on sanitizers if necessary.
|
||||
|
Loading…
Reference in New Issue
Block a user