1MSAN, ASAN, & TSAN 2================== 3 4*Testing Skia with memory, address, and thread santizers.* 5 6Downloading Clang Binaries (Googlers Only) 7------------------------------------------ 8 9 CLANGDIR="${HOME}/clang" 10 python infra/bots/assets/clang_linux/download.py -t $CLANGDIR 11 12Building Clang from scratch 13--------------------------- 14 15 CLANGDIR="${HOME}/clang" 16 17 python tools/git-sync-deps 18 CC= CXX= infra/bots/assets/clang_linux/create.py -t "$CLANGDIR" 19 20Configure and Compile Skia with MSAN 21------------------------------------ 22 23 CLANGDIR="${HOME}/clang" 24 mkdir -p out/msan 25 cat > out/msan/args.gn <<- EOF 26 cc = "${CLANGDIR}/bin/clang" 27 cxx = "${CLANGDIR}/bin/clang++" 28 extra_ldflags = [ "-Wl,-rpath", "-Wl,${CLANGDIR}/msan" ] 29 sanitize = "MSAN" 30 skia_use_fontconfig = false 31 EOF 32 python tools/git-sync-deps 33 bin/gn gen out/msan 34 ninja -C out/msan 35 36Configure and Compile Skia with ASAN 37------------------------------------ 38 39 CLANGDIR="${HOME}/clang" 40 mkdir -p out/asan 41 cat > out/asan/args.gn <<- EOF 42 cc = "${CLANGDIR}/bin/clang" 43 cxx = "${CLANGDIR}/bin/clang++" 44 sanitize = "ASAN" 45 EOF 46 python tools/git-sync-deps 47 bin/gn gen out/asan 48 ninja -C out/asan 49 50Configure and Compile Skia with TSAN 51------------------------------------ 52 53 CLANGDIR="${HOME}/clang" 54 mkdir -p out/tsan 55 cat > out/tsan/args.gn <<- EOF 56 cc = "${CLANGDIR}/bin/clang" 57 cxx = "${CLANGDIR}/bin/clang++" 58 sanitize = "TSAN" 59 is_debug = false 60 EOF 61 python tools/git-sync-deps 62 bin/gn gen out/tsan 63 ninja -C out/tsan 64 65 66