KKevin LubickUse buildifier to reformat all Bazel files
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Use buildifier to reformat all Bazel files After updating to buildifier 6.3.3 Ran the following commands: shopt -s globstar buildifier --mode=fix --lint=fix **/BUILD.bazel buildifier --mode=fix --lint=fix **/*.bzl This mostly sorted the load statements. Change-Id: I7da7513afbc147300cfecb38073ad52c05da2f16 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/763276 Reviewed-by: Leandro Lovisolo <lovisolo@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 2 年前 | |
Replace exec_tools -> tools and update to Bazel 6.3.2 The old 5.3.2 had a glitch that prevent tools from working correctly with our cc_binary_with_flags (which is hopefully going away soon). This updates both. go/genrule-exec-tools-cleanup-lsc Change-Id: I808e3aa134f6c9c6755306c63be07ca33b58de78 Bug: b/256864786 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/729416 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> | 2 年前 | |
[bazel] Add the "zip" command to the Linux RBE toolchain container image. The "zip" command needs to be present in the RBE toolchain container in order for Bazel to be able to zip up any undeclared test outputs. This is the mechanism we use to retrieve PNGs generated by GM tests that run on RBE (e.g. those that do not require a GPU). Bug: b/40045301 Change-Id: I8cd9de6fead5380dacd4b899e1da9cf91ab2990a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/740397 Commit-Queue: Leandro Lovisolo <lovisolo@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com> | 2 年前 | |
[bazel] Add RBE support using hermetic Linux Clang toolchain A new RBE worker-pool called gce_linux was created in conjunction with this CL. See https://docs.google.com/document/d/14xMZCKews69SSTfULhE8HDUzT5XvPwZ4CvRufEvcZ74/edit# for some details on that. Note: everything under bazel/rbe/gce_linux was autogenerated and can be ignored from manual review. It basically specifies what files are on the RBE image that are necessary for running Bazel. Testing it out can be done by authenticating for RBE gcloud auth application-default login --no-browser Then, run make -C bazel rbe_known_good_builds to test it out. On my 4 core laptop with an empty local cache, but a warm remote cache, the build took <2 min instead of the 10+ minutes it would have [1]. The folder structure in //bazel/rbe is meant to let us have multiple remote configurations there, e.g. //bazel/rbe/gce_windows. Suggested Review Order: - bazel/rbe/README.md - bazel/rbe/gce_linux_container/Dockerfile to see the bare-bones RBE image. - bazel/rbe/BUILD.bazel to see a custom platform defined. It is nearly identical to the autogenerated one in bazel/rbe/gce_linux/config/BUILD, with one extra field to force the gce_linux pool to be used. - .bazelrc to see the settings needed to make --config=linux-rbe work. The naming convention was inspired by SkCMS's setup [2], and allows us to have some common RBE settings (i.e. config:remote) and some specialized ones for the given host machine (e.g. config:linux-rbe) A very important, but subtle configuration, is on line 86 of .bazelrc where we say to use our hermetic toolchain and not whatever C++ compiler and headers are on the host machine (aka the RBE container). - toolchain/build_toolchain.bzl to see some additional dependencies needed in the toolchain (to run IWYU) which I had installed locally but didn't realize were important. - third_party/BUILD.bazel to see an example of how failing to specify all files can result in something that works locally, but fails remotely. --execution_log_json_file=/tmp/execlog.json helped debug these issues. - All other files. [1] http://go/scrcast/NjM1ODE4MDI0NzM3MTc3Nnw3ODViZmFkMi1iOA [2] https://skia.googlesource.com/skcms/+/30c8e303800c256febb03a09fdcda7f75d119b1b/.bazelrc#20 Change-Id: Ia0a9e6a06c1a13071949ab402dc5d897df6b12e1 Bug: skia:12541 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524359 Reviewed-by: Leandro Lovisolo <lovisolo@google.com> | 4 年前 |