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
# 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" ]
# 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': [
},
}, {
'type': 'static_library',
+ 'cflags': [ '-w' ],
'sources': [
'../third_party/externals/zlib/adler32.c',
'../third_party/externals/zlib/compress.c',
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