Full remote mode in Bazel

Viewed 52

Is it possible to run the Bazel with a mode, which execute all actions on the remote executor? Ideally I would like to limit all possible network traffic like sending *.o files, which are required only to link a final binary

1 Answers

It sure is. This is something I tend to keep as my default (as I often develop on cellular data).

If you add the following to your .bazelrc you can minimise the downloads.

build --remote_download_minimal
build --remote_download_outputs=minimal

There are a whole host of other flags that can be used to fine-tune what is downloaded from the remote executor and when. You can find these flags by searching through the Bazel command-line reference. e.g. use ctrl-F and 'remote_download_'.

NOTE: This does not eliminate downloads for targets that are tagged as 'local'.

Related