2014-11-04 17:58:40 +08:00
|
|
|
#!/bin/sh
|
2015-05-01 05:19:31 +08:00
|
|
|
export CFLAGS="-fsanitize=address -lasan"
|
2014-11-04 17:58:40 +08:00
|
|
|
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
|
2015-05-07 05:24:29 +08:00
|
|
|
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 $*
|