Closed malt3 closed 2 days ago
Pinging @meteorcloudy for awareness: If my understanding of this problem is correct, this might be a problem we might want to solve prior to a release of Bazel 8.
Just noticed that for most consumers, BUILD.tpl
and the implementation of cc_toolchain_config
will be in sync. This is only a problem for rules_nixpkgs.
Description of the problem:
rules_cc
is the new owner of what previously was@bazel_tools//tools/cpp:BUILD.tpl
. This file is now here: https://github.com/bazelbuild/rules_cc/blob/5be90a4e04e64df0e9d26382e1006d3df21aaa91/cc/private/toolchain/BUILD.tplBugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Using new versions of
rules_cc
with older versions of Bazel (< 8.0.0rc1) fails, becauseBUILD.tpl
directly passes attributes tocc_toolchain_config
which are only available in new Bazel versions (likeextra_flags_per_feature
):https://github.com/bazelbuild/rules_cc/blob/5be90a4e04e64df0e9d26382e1006d3df21aaa91/cc/private/toolchain/BUILD.tpl#L103-L126
I think this would also prevent the addition of new attributes in the future, since everyone would need to upgrade Bazel and
rules_cc
in lockstep.What operating system are you running Bazel on?
Ubuntu 22.04 amd64
What's the output of
bazel info release
?Multiple versions including
release 6.5.0
.If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.N/A
What version of rules_cc do you use? Can you paste the workspace rule used to fetch rules_cc? What other relevant dependencies does your project have?
Anything after c2549f6eb07ce00e529b84f9b9f1b31135a9ff77.
What Bazel options do you use to trigger the issue? What C++ toolchain do you use?
@bazel_tools//tools/cpp:unix_cc_configure.bzl
Have you found anything relevant by searching the web?