Index: tools/xsan_build |
diff --git a/tools/xsan_build b/tools/xsan_build |
index d1960bccad732c6c98b5aaae75d01fd22f062aca..db255fb20a79941c9c0b156251572aa0be781520 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 |