dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.06k stars 1.56k forks source link

Can we make build bots run build.py --verbose? #42110

Open ghost opened 4 years ago

ghost commented 4 years ago

Both when debugging builds on the build bots, and when trying to replicate bot builds locally, it would be helpful to have the full logs available.

Currently the bots run build.py without -v/--verbose, producing logs with each step:

[1/1901] ACTION //runtime:generate_version_cc_file(//build/toolchain/linux:x86)
[2/1901] STAMP obj/runtime/generate_version_cc_file.stamp
[3/1901] CXX obj/runtime/bin/gen_snapshot_dart_io.sync_socket_android.o
...

Where-as with --verbose we get the full command that was run:

[1/1751] /[...]/goma/gomacc ../../buildtools/linux-x64/clang/bin/clang++ -MMD -MF obj/runtime/bin/libcrashpad.crashpad.o.d -DTOOLCHAIN_VERSION=TsEi2xEkKNksXKms4r4Jsab3Max5Ohpai3QbuUpxKaoC -DNDEBUG -DTARGET_ARCH_X64 -DNDEBUG -DDART_USE_TCMALLOC -DPRODUCT -DTARGET_OS_FUCHSIA -I../../runtime -I../.. -Igen -I../../runtime/include -I../../third_party/tcmalloc/gperftools/src -m64 -march=x86-64 -msse2 -fno-exceptions -fPIC -fcolor-diagnostics -Wall -Wextra -Werror -Wendif-labels -Wno-missing-field-initializers -Wno-unused-parameter -Wno-tautological-constant-compare -fdebug-prefix-map=/[...]/src/dart_labd/sdk=../.. -no-canonical-prefixes --sysroot=../../build/linux/debian_jessie_amd64-sysroot -Wheader-hygiene -Wstring-conversion -O3 -fno-ident -fdata-sections -ffunction-sections -g3 -ggdb3 -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field -Wnon-virtual-dtor -Wvla -Woverloaded-virtual -Wno-comments -g3 -ggdb3 -fno-rtti -fno-exceptions -Wimplicit-fallthrough -O3 -fvisibility-inlines-hidden -fno-omit-frame-pointer -std=c++11 -fno-rtti -fno-exceptions -c ../../runtime/bin/crashpad.cc -o obj/runtime/bin/libcrashpad.crashpad.o
...

With the full logs we'd be able to see exactly which commands with which flags were run, which cannot otherwise be inferred from the log.

ghost commented 4 years ago

A quick local test shows that tools/build.py --arch x64 --mode release dart without and with -v produces logs of 123 K and 2.1 M respectively. This would mean a log storage increase of ~2 M per log in this particular case.

While I'm not familiar with any limitations here, I imagine this is a negligible increase.