radare2/sys/asan.sh

14 lines
305 B
Bash
Raw Normal View History

#!/bin/sh
export CFLAGS="-fsanitize=address -lasan"
export LDFLAGS="-lasan"
2014-11-07 05:30:24 +08:00
echo 'int main(){return 0;}' > .a.c
[ -z "${CC}" ] && CC=gcc
${CC} ${CFLAGS} ${LDFLAGS} -o .a.out .a.c
RET=$?
2014-11-17 19:27:35 +08:00
rm -f .a.out .a.c
if [ $RET != 0 ]; then
echo "Your compiler doesn't support ASAN."
2014-11-07 05:30:24 +08:00
exit 1
fi
2015-04-29 16:41:18 +08:00
exec sys/install.sh $*