79703918

Date: 2025-07-16 19:15:44
Score: 1
Natty:
Report link

I find mancini0's answer over at https://stackoverflow.com/a/63309367/527489 to be more helpful:

some examples for your .bazelrc

build --local_ram_resources=HOST_RAM*.5 --local_cpu_resources=HOST_CPUS-1 (leave one core free)

or

build --local_cpu_resources=1 (use a single core)

See https://docs.bazel.build/versions/master/command-line-reference.html#flag--local_cpu_resources

The currently accepted answer [to Is there a way to limit the number of CPU cores Bazel uses?] is deprecated.

Note that instead of configuring your user.bazelrc or ~/.bazelrc, you can instead just pass these on the command line, such as:

bazel build --local_cpu_resources=1 -c opt //npsw/...
bazel test --local_cpu_resources=1 -c opt //npsw/...
Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Blacklisted phrase (1): Is there a way
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: sage