Skip to content

Commit

Permalink
Enable address sanitizer for clang
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed Apr 15, 2016
1 parent 089643b commit a58aa66
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions script/ci-build-libsass
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ if [ "x$PREFIX" == "x" ]; then
fi
fi

# enable address sanitation
# https://en.wikipedia.org/wiki/AddressSanitizer
if [ "x$CC" == "xclang" ]; then
if [ "x$COVERAGE" != "xyes" ]; then
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
export EXTRA_CFLAGS="$EXTRA_CFLAGS -fsanitize=address"
export EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -fsanitize=address"
export EXTRA_LDFLAGS="$EXTRA_LDFLAGS -fsanitize=address"
fi
fi
fi

echo SASS_LIBSASS_PATH: $SASS_LIBSASS_PATH
echo TRAVIS_BUILD_DIR: $TRAVIS_BUILD_DIR
echo SASS_SASSC_PATH: $SASS_SASSC_PATH
Expand Down

0 comments on commit a58aa66

Please sign in to comment.