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-06 21:30:24 +00:00
echo 'int main(){return 0;}' > .a.c
[ -z "${CC}" ] && CC=gcc
${CC} ${CFLAGS} ${LDFLAGS} -o .a.out .a.c
RET=$?
2014-11-17 11:27:35 +00:00
rm -f .a.out .a.c
if [ $RET != 0 ]; then
echo "Your compiler doesn't support ASAN."
2014-11-06 21:30:24 +00:00
exit 1
fi
2015-04-29 08:41:18 +00:00
exec sys/install.sh $*