mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
CMake: Rename USE_ADDRESS_SANITIZER to USE_ASAN
For consistency with USE_UBSAN
This commit is contained in:
1 parent
3bd3046315
commit
0fb42e07a6
5 files changed
+8
-8
No files matched your search
+3
-3
@@ -134,7 +134,7 @@ option(USE_MINIUPNPC "Build with miniUPnPc support" ON)
|
||||
option(USE_SYSTEM_SNAPPY "Dynamically link against system snappy" ${USE_SYSTEM_SNAPPY})
|
||||
option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_FFMPEG})
|
||||
option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_LIBZIP})
|
||||
option(USE_ADDRESS_SANITIZER "Use address sanitizer" OFF)
|
||||
option(USE_ASAN "Use address sanitizer" OFF)
|
||||
option(USE_UBSAN "Use undefined behaviour sanitizer" OFF)
|
||||
|
||||
if(UNIX AND NOT (APPLE OR ANDROID) AND VULKAN)
|
||||
@@ -273,11 +273,11 @@ if(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-uninitialized")
|
||||
endif()
|
||||
|
||||
if(USE_ADDRESS_SANITIZER)
|
||||
if(USE_ASAN)
|
||||
message("Address sanitizer enabled (DEBUG only)")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address")
|
||||
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fsanitize=address")
|
||||
add_definitions(-DUSE_ADDRESS_SANITIZER)
|
||||
add_definitions(-DUSE_ASAN)
|
||||
endif()
|
||||
if(USE_UBSAN)
|
||||
message("Undefined behaviour sanitizer enabled (DEBUG only)")
|
||||
|
||||
@@ -107,7 +107,7 @@ void MemArena::ReleaseView(void* view, size_t size) {
|
||||
|
||||
u8* MemArena::Find4GBBase() {
|
||||
// Now, create views in high memory where there's plenty of space.
|
||||
#if PPSSPP_ARCH(64BIT) && !defined(USE_ADDRESS_SANITIZER)
|
||||
#if PPSSPP_ARCH(64BIT) && !defined(USE_ASAN)
|
||||
// We should probably just go look in /proc/self/maps for some free space.
|
||||
// But let's try the anonymous mmap trick, just like on 32-bit, but bigger and
|
||||
// aligned to 4GB for the movk trick. We can ensure that we get an aligned 4GB
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ extern u32 g_PSPModel;
|
||||
|
||||
// UWP has such limited memory management that we need to mask
|
||||
// even in 64-bit mode. Also, when using the sanitizer, we need to mask as well.
|
||||
#if PPSSPP_ARCH(32BIT) || PPSSPP_PLATFORM(UWP) || USE_ADDRESS_SANITIZER || PPSSPP_PLATFORM(IOS)
|
||||
#if PPSSPP_ARCH(32BIT) || PPSSPP_PLATFORM(UWP) || USE_ASAN || PPSSPP_PLATFORM(IOS)
|
||||
#define MASKED_PSP_MEMORY
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -585,8 +585,8 @@ void SystemInfoScreen::CreateViews() {
|
||||
#else
|
||||
buildConfig->Add(new InfoItem("NDEBUG", ""));
|
||||
#endif
|
||||
#ifdef USE_ADDRESS_SANITIZER
|
||||
buildConfig->Add(new InfoItem("USE_ADDRESS_SANITIZER", ""));
|
||||
#ifdef USE_ASAN
|
||||
buildConfig->Add(new InfoItem("USE_ASAN", ""));
|
||||
#endif
|
||||
#ifdef USING_GLES2
|
||||
buildConfig->Add(new InfoItem("USING_GLES2", ""));
|
||||
|
||||
Reference in new issue
Block a user