mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
CMake: Rename USE_ADDRESS_SANITIZER to USE_ASAN
For consistency with USE_UBSAN
This commit is contained in:
parent
3bd3046315
commit
0fb42e07a6
5 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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", ""));
|
||||
|
|
2
b.sh
2
b.sh
|
@ -61,7 +61,7 @@ do
|
|||
export CXX=/usr/bin/clang++
|
||||
;;
|
||||
--sanitize) echo "Enabling address-sanitizer if available"
|
||||
CMAKE_ARGS="-DUSE_ADDRESS_SANITIZER=ON ${CMAKE_ARGS}"
|
||||
CMAKE_ARGS="-DUSE_ASAN=ON ${CMAKE_ARGS}"
|
||||
;;
|
||||
*) MAKE_OPT="$1 ${MAKE_OPT}"
|
||||
;;
|
||||
|
|
Loading…
Add table
Reference in a new issue