7eb529fb72
BUG=skia: R=borenet@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/257613004 git-svn-id: http://skia.googlecode.com/svn/trunk@14356 2bbb7eff-a529-9590-31e7-b0007b416f81
32 lines
633 B
Bash
Executable File
32 lines
633 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Build Skia with one of Clang's many sanitizers.
|
|
#
|
|
# $ tools/xsan_build {address,thread,undefined,etc.} [any other flags to pass to make...]
|
|
#
|
|
# This script assumes the use of Clang >=3.2.
|
|
#
|
|
# For more information, see:
|
|
# http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
|
|
|
|
set -e
|
|
|
|
sanitizer=$1
|
|
shift
|
|
args="$@"
|
|
|
|
export CC="$(which clang)"
|
|
export CXX="$(which clang++)"
|
|
|
|
if [[ -z "${CC}" ]] || [[ -z "${CXX}" ]]; then
|
|
echo "Couldn't find Clang on this machine!"
|
|
exit 1
|
|
fi
|
|
|
|
echo "CC=$CC"
|
|
echo "CXX=$CXX"
|
|
$CC --version
|
|
|
|
export GYP_DEFINES="skia_sanitizer=$sanitizer ${GYP_DEFINES}"
|
|
make ${args}
|