Put all XSAN bots on the same DEPS-sourced build of Clang.
This adds LLVM, Clang, and compiler-rt (*san tools) to DEPS,
then uses them from xsan_build, building them if needed.
This is similar to how the CMake bots bootstrap CMake if needed.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1693733003
Review URL: https://codereview.chromium.org/1693733003
diff --git a/DEPS b/DEPS
index de69d8c..531f01f 100644
--- a/DEPS
+++ b/DEPS
@@ -50,6 +50,11 @@
# Mojo SDK for Mojo RPC experiments.
"third_party/externals/mojo/public" : "https://chromium.googlesource.com/external/github.com/domokit/mojo_sdk@172be18ea745ab29aea132e6cb952e726dc32543",
+
+
+ "third_party/externals/llvm": "https://llvm.googlesource.com/llvm@release_38",
+ "third_party/externals/llvm/tools/clang": "https://llvm.googlesource.com/clang@release_38",
+ "third_party/externals/llvm/projects/compiler-rt": "https://llvm.googlesource.com/compiler-rt@release_38",
}
recursedeps = [ "common" ]
diff --git a/gyp/yasm.gyp b/gyp/yasm.gyp
index de1d1dc..272778b 100644
--- a/gyp/yasm.gyp
+++ b/gyp/yasm.gyp
@@ -64,7 +64,7 @@
# Silence warnings in libc++ builds (C code doesn't need this flag).
'ldflags!': [ '-stdlib=libc++', '-fsanitize=<(skia_sanitizer)' ],
# https://crbug.com/489901
- 'cflags!': [ '-fsanitize=bounds', '-fsanitize=<(skia_sanitizer)' ],
+ 'cflags!': [ '-fsanitize=bounds', '-fsanitize=<(skia_sanitizer)', '-fsanitize-memory-track-origins' ],
'libraries!': [ '-llog', ],
},
'targets': [
diff --git a/gyp/zlib.gyp b/gyp/zlib.gyp
index 24c7a0a..59ca61c 100644
--- a/gyp/zlib.gyp
+++ b/gyp/zlib.gyp
@@ -19,6 +19,7 @@
},
}, {
'type': 'static_library',
+ 'cflags': [ '-w' ],
'sources': [
'../third_party/externals/zlib/adler32.c',
'../third_party/externals/zlib/compress.c',
diff --git a/tools/xsan_build b/tools/xsan_build
index d1960bc..db255fb 100755
--- a/tools/xsan_build
+++ b/tools/xsan_build
@@ -12,8 +12,25 @@
set -e
set -x
-export CC=clang
-export CXX=clang++
+here=$(cd `dirname $0`; echo `pwd`)
+cores=48
+
+echo "Bootstrapping CMake"
+pushd $here/../third_party/externals/cmake
+./bootstrap --parallel=$cores
+make -j $cores cmake
+popd
+
+echo "Building Clang"
+pushd $here/../third_party/externals/llvm
+mkdir -p out/
+cd out/
+$here/../third_party/externals/cmake/bin/cmake -DCMAKE_BUILD_TYPE=Release -G Ninja ..
+ninja
+popd
+
+export CC=$here/../third_party/externals/llvm/out/bin/clang
+export CXX=$here/../third_party/externals/llvm/out/bin/clang++
$CC --version
if [[ "$1" == "memory" ]]; then