Disable AddressSanitizer in release builds.

This commit is contained in:
Kyle Neideck 2017-06-24 22:28:11 +10:00
parent a4a9530513
commit 243c798ccd
No known key found for this signature in database
GPG key ID: CAA8D9B8E39EC18C
2 changed files with 11 additions and 1 deletions

View file

@ -1237,7 +1237,7 @@
ALWAYS_SEARCH_USER_PATHS = NO;
BGM_STOP_DEBUGGER_ON_LOGGED_EXCEPTIONS = 0;
BGM_STOP_DEBUGGER_ON_LOGGED_UNEXPECTED_EXCEPTIONS = 0;
CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES;
CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;

View file

@ -612,6 +612,12 @@ else
ACTIONING="Building"
fi
if [[ "${CONFIGURATION}" == "Debug" ]]; then
ENABLE_ASAN=YES
else
ENABLE_ASAN=NO
fi
# BGMDriver
echo "[1/3] ${ACTIONING} the virtual audio device $(bold_face ${DRIVER_DIR}) to" \
@ -623,6 +629,7 @@ echo "[1/3] ${ACTIONING} the virtual audio device $(bold_face ${DRIVER_DIR}) to"
# Build Apple's PublicUtility classes as a static library.
${SUDO} "${XCODEBUILD}" -scheme "PublicUtility" \
-configuration ${CONFIGURATION} \
-enableAddressSanitizer ${ENABLE_ASAN} \
BUILD_DIR=./build \
RUN_CLANG_STATIC_ANALYZER=0 \
${XCODEBUILD_OPTIONS} \
@ -632,6 +639,7 @@ echo "[1/3] ${ACTIONING} the virtual audio device $(bold_face ${DRIVER_DIR}) to"
# Build and install BGMDriver
${SUDO} "${XCODEBUILD}" -scheme "Background Music Device" \
-configuration ${CONFIGURATION} \
-enableAddressSanitizer ${ENABLE_ASAN} \
BUILD_DIR=./build \
RUN_CLANG_STATIC_ANALYZER=0 \
DSTROOT="/" \
@ -648,6 +656,7 @@ echo "[2/3] ${ACTIONING} $(bold_face ${XPC_HELPER_DIR}) to $(bold_face ${XPC_HEL
(disable_error_handling
${SUDO} "${XCODEBUILD}" -scheme BGMXPCHelper \
-configuration ${CONFIGURATION} \
-enableAddressSanitizer ${ENABLE_ASAN} \
BUILD_DIR=./build \
RUN_CLANG_STATIC_ANALYZER=0 \
DSTROOT="/" \
@ -665,6 +674,7 @@ echo "[3/3] ${ACTIONING} $(bold_face ${APP_DIR}) to $(bold_face ${APP_PATH})" \
(disable_error_handling
${SUDO} "${XCODEBUILD}" -scheme "Background Music" \
-configuration ${CONFIGURATION} \
-enableAddressSanitizer ${ENABLE_ASAN} \
BUILD_DIR=./build \
RUN_CLANG_STATIC_ANALYZER=0 \
DSTROOT="/" \