blob: f3c4d746a01e8c01bce6fb633ef397e233354fc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/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}
|