aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-03 18:07:59 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-03 18:07:59 -0700
commit50eff80ca16a351ec80f75f0f6cf5f0f87207fb1 (patch)
treea237edc65cf050aae558e8664b0990ec26ab56da /CMakeLists.txt
parent96c118779daff9ea099710957a62c83115c149ef (diff)
downloadPrismLauncher-50eff80ca16a351ec80f75f0f6cf5f0f87207fb1.tar.gz
PrismLauncher-50eff80ca16a351ec80f75f0f6cf5f0f87207fb1.tar.bz2
PrismLauncher-50eff80ca16a351ec80f75f0f6cf5f0f87207fb1.zip
build: optimize address-sanitizer
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd84daf3..11e4c628 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -92,16 +92,16 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug" AND DEBUG_ADDRESS_SANITIZER)
message(STATUS "Address Sanitizer enabeled for Debug builds, Turn it off with -DDEBUG_ADDRESS_SANITIZER=off")
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
# AppleClang and Clang
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -faddress-sanitizer -O1 -fno-omit-frame-pointer")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# GCC
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
# Intell compiler ? why?
# no address sanitiser here though
message(STATUS "Address Sanitizer not available on Intell compilers")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address /O1 /Oy-")
else()
message(STATUS "Address Sanitizer not available on unknown compiler ${CMAKE_CXX_COMPILER_ID}")
endif()