You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bazel ignores "cpp_link.cpu" exec properties when linking strategy is set to local #25195
While trying to restrict concurrency to 1 when linking, I tried to set the "cpp_link.mem" and "cpp_link.cpu" exec properties equal to the memory and cpu of the host system, but I'm still getting 5+ link job concurrency. In this configuration --strategy=CppLink=local is set, while the other actions are remote.
To validate that I'm setting the property in the correct place, I checked that the "cpp_link.timeout" flag set adjacent to where I'm setting mem/cpu is getting respected in this test case. The build times out immediately if I set it to 1.
Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Install bazel 7.5.0
Setup several cc_binary targets with long link durations
Set the exec_properties to {"cpp_link.cpu": "100"} (or your cpu on each target
Perform a bazel build
Observe that multiple linker actions are scheduled in parallel
Which operating system are you running Bazel on?
Ubuntu 22.04 ARM64
What is the output of bazel info release?
release 7.5.0
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse HEAD ?
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
@pzembrod is there any other way to restrict the concurrency of specific action types during local execution? This seems like it would be an issue in most large C++ code bases
I'm not aware of a concurrency restriction mechanism for specific action types.
Is either using --jobs or --local_cpu_resources or --local_ram_resources an option for you?
A fix for this issue has been included in Bazel 9.2.0 RC1. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=9.2.0rc1. Thanks!
Activity
pzembrod commentedon Jun 23, 2025
I'm personally not familiar with exec_properties, but looking at https://bazel.build/reference/be/platforms-and-toolchains#platform.exec_properties I would say that it is WAI if bazel doesn't interpret them when executing local actions.
zackwintermdb commentedon Jun 23, 2025
@pzembrod is there any other way to restrict the concurrency of specific action types during local execution? This seems like it would be an issue in most large C++ code bases
pzembrod commentedon Aug 1, 2025
I'm not aware of a concurrency restriction mechanism for specific action types.
Is either using
--jobsor--local_cpu_resourcesor--local_ram_resourcesan option for you?Related: #17368 and #25770
Make local scheduling respect exec_properties resources
keith commentedon Apr 13, 2026
#29284
Make local scheduling respect exec_properties resources
Make local scheduling respect exec_properties resources (bazelbuild#2…
[9.2.0] Make local scheduling respect exec_properties resources (baze…
iancha1992 commentedon Jun 26, 2026
A fix for this issue has been included in Bazel 9.2.0 RC1. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting
USE_BAZEL_VERSION=9.2.0rc1. Thanks!