mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
[CMake] Add -O1 in debug builds with LLVM_USE_SANITIZER
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189747 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
69c474ffa8
commit
b775f2f39c
@ -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…
x
Reference in New Issue
Block a user