testing of github.com/uber/hermetic_cc_toolchain
Go to file
2022-11-21 06:25:58 +02:00
bin let it be so 2022-10-19 12:00:28 +03:00
.bazelrc let it be so 2022-10-19 12:00:28 +03:00
.envrc update README, remove buildifier 2022-11-21 06:25:58 +02:00
.gitignore let it be so 2022-10-19 12:00:28 +03:00
BUILD update README, remove buildifier 2022-11-21 06:25:58 +02:00
main.cc add forgotten main.cc 2022-11-21 06:19:32 +02:00
README.md update README, remove buildifier 2022-11-21 06:25:58 +02:00
WORKSPACE upgrade bazel-zig-cc and zig 2022-11-21 06:18:35 +02:00

bazel-zig-cc and llvm

bazel-zig-cc has a performance issue when compiling many files. This repository reproduces that.

Steps to reproduce

llvm14: 12-13 seconds to compile 64 binaries on an 8-core machine:

$ bazel clean; bazel shutdown; bazel build --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux ...
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.
Starting local Bazel server and connecting to it...
INFO: Analyzed 64 targets (41 packages loaded, 1426 targets configured).
INFO: Found 64 targets...
INFO: Elapsed time: 12.454s, Critical Path: 1.11s
INFO: 321 processes: 193 internal, 128 linux-sandbox.
INFO: Build completed successfully, 321 total actions

zig cc: 2,5 minutes:

$ bazel clean; bazel shutdown; bazel build  --platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28 ...
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.
Starting local Bazel server and connecting to it...
INFO: Analyzed 64 targets (41 packages loaded, 14450 targets configured).
INFO: Found 64 targets...
INFO: Elapsed time: 142.264s, Critical Path: 20.65s
INFO: 257 processes: 129 internal, 128 linux-sandbox.
INFO: Build completed successfully, 257 total actions