Make ASAN a distinct build type from Debug

This commit is contained in:
Gary Talent 2018-03-17 23:44:02 -05:00
parent 4c23a2d761
commit 585d79a219
4 changed files with 17 additions and 2 deletions

1
deps/ox/.gitignore vendored
View File

@ -1,5 +1,6 @@
build/current
build/gba
build/*-asan
build/*-debug
build/*-release
tags

6
deps/ox/Makefile vendored
View File

@ -49,6 +49,12 @@ debug:
${ENV_RUN} rm -f build/current
${ENV_RUN} ln -s ${HOST_ENV}-debug build/current
asan:
${ENV_RUN} rm -rf build/${HOST_ENV}-asan
${ENV_RUN} ./scripts/setup_build ${HOST_ENV} asan
${ENV_RUN} rm -f build/current
${ENV_RUN} ln -s ${HOST_ENV}-debug build/current
windows:
${ENV_RUN} rm -rf build/windows
${ENV_RUN} ./scripts/setup_build windows

View File

@ -1,4 +1,4 @@
all: gba_build native_build native_debug_build windows_release windows_debug
all: gba_build native_build native_debug_build native_asan_build windows_release windows_debug
gba_build:
@if [ -d gba-release ]; then \
@ -15,6 +15,11 @@ native_debug_build:
cmake --build ${HOST_ENV}-debug --target ${ARGS}; \
fi
native_asan_build:
@if [ -d ${HOST_ENV}-asan ]; then \
cmake --build ${HOST_ENV}-asan --target ${ARGS}; \
fi
windows_release:
@if [ -d windows-release ]; then \
cmake --build windows-release --target ${ARGS}; \

View File

@ -13,8 +13,11 @@ elif [[ $TARGET == gba ]]; then
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/GBA.cmake -DOX_USE_STDLIB=OFF -DCMAKE_INSTALL_PREFIX=$DEVKITARM"
fi
if [[ $BUILD_TYPE == debug ]]; then
if [[ $BUILD_TYPE == asan ]]; then
buildTypeArgs="-DUSE_ASAN=ON -DCMAKE_BUILD_TYPE=Debug"
buildDir="build/${TARGET}-asan"
elif [[ $BUILD_TYPE == debug ]]; then
buildTypeArgs="-DCMAKE_BUILD_TYPE=Debug"
buildDir="build/${TARGET}-debug"
else
buildTypeArgs="-DCMAKE_BUILD_TYPE=Release"