Fixing debug build options - now links with -faddress=sanitize as well as compiles
This commit is contained in:
parent
9112610fbe
commit
8bea861d19
|
@ -67,6 +67,8 @@ popdir () {
|
|||
# --------------------------------------------
|
||||
# Project Directory Identification
|
||||
|
||||
OLD_PATH=$(pwd)
|
||||
|
||||
BUILD_SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
pushdir $BUILD_SCRIPT_DIR
|
||||
pushdir ..
|
||||
|
@ -309,7 +311,7 @@ COMPILER_FLAGS=(${FLAGS[@]})
|
|||
parse_flags_from_selectors "compiler" "input" $PLATFORM $ARCH
|
||||
COMPILER_INPUTS=(${FLAGS[@]})
|
||||
|
||||
parse_flags_from_selectors "linker" $MODE $PLATFORM $ARCH
|
||||
parse_flags_from_selectors "linker" "flags" $MODE $PLATFORM $ARCH
|
||||
LINKER_FLAGS=(${FLAGS[@]})
|
||||
|
||||
parse_flags_from_selectors "linker" "libs" $LINKER $MODE $PLATFORM $ARCH
|
||||
|
@ -331,7 +333,9 @@ fi
|
|||
# Compile The Program
|
||||
|
||||
printf "\nBeginning Compilation...\n"
|
||||
pushdir $OUT_PATH
|
||||
pushd $OUT_PATH
|
||||
|
||||
find . -name "*" -delete
|
||||
|
||||
if [[ -f ${HOOK_PREBUILD} ]]; then
|
||||
source "${HOOK_PREBUILD}"
|
||||
|
@ -387,9 +391,8 @@ fi
|
|||
|
||||
LINKER_ARGS="-o ${LINKER_OUTPUT} ${COMPILER_OUTPUT[@]} ${LINKER_FLAGS[@]} ${LINKER_LIBRARIES[@]}"
|
||||
|
||||
|
||||
printf "Linking...\n"
|
||||
# echo $LINKER $LINKER_ARGS
|
||||
echo $LINKER $LINKER_ARGS
|
||||
eval $LINKER $LINKER_ARGS
|
||||
if [ $? -eq 0 ]; then
|
||||
printf " Link: "
|
||||
|
|
|
@ -40,11 +40,11 @@ compiler>debug>msvc>win32>-Zi #
|
|||
compiler>debug>msvc>win32>-DDEBUG=1 #
|
||||
# compiler>debug>msvc>win32>-DPRINT_ASSERTS=1
|
||||
|
||||
debug>clang>-O0
|
||||
debug>clang>-g
|
||||
debug>compiler>-DDEBUG=1
|
||||
compiler>debug>clang>-O0
|
||||
compiler>debug>clang>-g
|
||||
compiler>debug>compiler>-DDEBUG=1
|
||||
|
||||
debug>clang>-fsanitize=address
|
||||
compiler>debug>clang>-fsanitize=address
|
||||
|
||||
# Compiler: Prod
|
||||
compiler>release>clang>-O3
|
||||
|
@ -66,7 +66,8 @@ linker>wasm>--unresolved-symbols=import-functions
|
|||
# TODO: I don't think the build system supports this right now
|
||||
linker>raspi>-fuse-ld=lld
|
||||
|
||||
linker>debug>-debug
|
||||
# linker>flags>debug>-debug
|
||||
linker>flags>debug>-fsanitize=address
|
||||
|
||||
################# LIBRARIES #################
|
||||
|
||||
|
|
Loading…
Reference in New Issue