Put all XSAN bots on the same DEPS-sourced build of Clang.
authormtklein <mtklein@chromium.org>
Fri, 12 Feb 2016 20:15:23 +0000 (12:15 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 12 Feb 2016 20:15:23 +0000 (12:15 -0800)
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

DEPS
gyp/yasm.gyp
gyp/zlib.gyp
tools/xsan_build

diff --git a/DEPS b/DEPS
index de69d8c..531f01f 100644 (file)
--- a/DEPS
+++ b/DEPS
@@ -50,6 +50,11 @@ deps = {
 
   # 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" ]
index de1d1dc..272778b 100644 (file)
@@ -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': [
index 24c7a0a..59ca61c 100644 (file)
@@ -19,6 +19,7 @@
           },
         }, {
           'type': 'static_library',
+          'cflags': [ '-w' ],
           'sources': [
             '../third_party/externals/zlib/adler32.c',
             '../third_party/externals/zlib/compress.c',
index d1960bc..db255fb 100755 (executable)
 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