Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: tools/xsan_build

Issue 1665823002: Hack together MSAN build. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: abstract away Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/images/SkImageDecoder_libjpeg.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Build Skia with one of Clang's many sanitizers. 3 # Build Skia with one of Clang's many sanitizers.
4 # 4 #
5 # $ tools/xsan_build {address,thread,undefined,etc.} [any other flags to pass to make...] 5 # $ tools/xsan_build {address,thread,undefined,etc.} [any other flags to pass to make...]
6 # 6 #
7 # This script assumes the use of Clang >=3.2. 7 # This script assumes the use of Clang >=3.2.
8 # 8 #
9 # For more information, see: 9 # For more information, see:
10 # http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation 10 # http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
11 11
12 set -e 12 set -e
13 set -x
13 14
14 sanitizer=$1 15 export CC=clang
15 shift 16 export CXX=clang++
16 args="$@"
17
18 export CC="$(which clang)"
19 export CXX="$(which clang++)"
20
21 if [[ -z "${CC}" ]] || [[ -z "${CXX}" ]]; then
22 echo "Couldn't find Clang on this machine!"
23 exit 1
24 fi
25
26 echo "CC=$CC"
27 echo "CXX=$CXX"
28 $CC --version 17 $CC --version
29 18
30 export GYP_DEFINES="skia_sanitizer=$sanitizer ${GYP_DEFINES}" 19 if [[ "$1" == "memory" ]]; then
31 make ${args} 20 export GYP_DEFINES="skia_gpu=0 skia_no_fontconfig=1 skia_freetype_static=1 $ {GYP_DEFINES}"
21 fi
22 export GYP_DEFINES="skia_sanitizer=$1 ${GYP_DEFINES}"
23
24 shift
25 make $@
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder_libjpeg.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698