3
3
ulimit -Ss 12288
4
4
5
5
ROOT=` pwd`
6
- LLVM=$ROOT /llvm
6
+ LLVM=$ROOT /llvm-project/llvm
7
7
8
8
BUILDBOT_CLOBBER=" ${BUILDBOT_CLOBBER:- } "
9
9
BUILDBOT_REVISION=" ${BUILDBOT_REVISION:- origin/ main} "
@@ -306,8 +306,10 @@ function build_stage2 {
306
306
-DCMAKE_CXX_FLAGS=" ${sanitizer_cflags} " \
307
307
-DCMAKE_EXE_LINKER_FLAGS=" ${sanitizer_ldflags} " \
308
308
$LLVM && \
309
- time ninja) || build_failure
310
- md5sum ${build_dir} /bin/clang || true
309
+ /usr/bin/time -o ${ROOT} /time.txt -- ninja ) || build_failure
310
+ (md5sum ${build_dir} /bin/clang* > ${ROOT} /md5.txt) || true
311
+
312
+ upload_stats stage2
311
313
}
312
314
313
315
function build_stage2_msan {
@@ -480,8 +482,10 @@ function build_stage3 {
480
482
-DCMAKE_CXX_FLAGS=" ${sanitizer_cflags} " \
481
483
-DLLVM_CCACHE_BUILD=OFF \
482
484
$LLVM && \
483
- time ninja) || build_failure
484
- md5sum ${build_dir} /bin/clang* || true
485
+ /usr/bin/time -o ${ROOT} /time.txt -- ninja ) || build_failure
486
+ (md5sum ${build_dir} /bin/clang* > ${ROOT} /md5.txt) || true
487
+
488
+ upload_stats stage3
485
489
}
486
490
487
491
function build_stage3_msan {
@@ -557,3 +561,13 @@ function build_exception() {
557
561
exit 2
558
562
fi
559
563
}
564
+
565
+ function upload_stats() {
566
+ if [[ " ${BUILDBOT_BISECT_MODE:- } " != " 1" && -v BUILDBOT_BUILDERNAME ]] ; then
567
+ lscpu > " ${ROOT} /cpu.txt"
568
+ curl http://metadata.google.internal/computeMetadata/v1/instance/machine-type \
569
+ -H Metadata-Flavor:Google > " ${ROOT} /machine-type.txt"
570
+ gsutil cp " ${ROOT} /" {time,md5,cpu,machine-type}" .txt" " gs://sanitizer-buildbot-out/${BUILDBOT_BUILDERNAME} /${1} /${BUILDBOT_REVISION} /" || true
571
+ fi
572
+ cat " ${ROOT} /" {time,md5}" .txt"
573
+ }
0 commit comments