Tracking issue: https://github.com/bazelbuild/rules_cc/issues/268
This CL adds a release workflow for rules_cc. It also adds a ci.bazelrc file that is used to configure Bazel on CI.
The release workflow is based on the release workflow for rules_proto. It uses the same release script, which generates a source archive and a release notes file. The release notes file is used as the top of the release notes for the release.
The ci.bazelrc file is used to configure Bazel on CI. It sets the --announce_rc option, which causes Bazel to print a message to the console whenever an option is set. It also sets the --disk_cache option, which tells Bazel to use a disk cache for downloaded external artifacts. This can help to speed up builds.
Finally, the ci.bazelrc file sets the --test_output option to errors. This causes Bazel to print test logs to the console, even if the tests pass. This can be helpful for debugging test failures.
PiperOrigin-RevId: 694052882
Change-Id: I7a55ec2d9b6b9161428dd3bb3c6c6b78b789ada2
This makes it possible to remove dependency on protobuf. The dependency causes more problems than compatibility with some users of cc_proto_library from rules_cc.
Move WORKSPACE.bzlmod into correct directory.
PiperOrigin-RevId: 691445019
Change-Id: I45d7b4e381483de14ea2d20110be40f471a1ad12
BEGIN_PUBLIC
Enable cquery in GitHub CI
This will prevent incompatible targets from being built and tested.
END_PUBLIC
PiperOrigin-RevId: 684771349
Change-Id: Iba8807531e2c5465f1378bc384359be439373bf6
BEGIN_PUBLIC
Add missing defaults for cc_toolchain
Fixes breakage caused by fully enumerating known attributes of a cc_toolchain without providing default values for optional arguments.
END_PUBLIC
PiperOrigin-RevId: 684719429
Change-Id: I8d031a344a65218fc925025cfef7768d123ad879
BEGIN_PUBLIC
Add documentation for `cc_toolchain`
Updates and includes documentation for the `cc_toolchain` rule, fixing some minor typos along the way.
END_PUBLIC
PiperOrigin-RevId: 684051451
Change-Id: I5bb62f22b3fb68e2d233fb85255d1a86bb45a47d
BEGIN_PUBLIC
Fix argument ordering
Expected argument ordering should be:
1. Arguments listed in `args`.
2. Legacy/built-in features.
3. User-defined features.
Due to some implementation changes, user-defined arguments were being applied last, reducing the ability for features to properly toggle behaviors dynamically.
This also fixes an issue caught by this change where cc_sysroot was applying flags to actions that had no associated action config.
END_PUBLIC
PiperOrigin-RevId: 683677895
Change-Id: I60e25ca22ffefce717e4e5ce476db0a070ca1993
The migration to .bzl configured toolchains happened a long time ago and the conversion tools from proto files are not needed anymore.
This also cleans up rules_cc dependencies to build those tools. And unblock me around the import of py_proto_library, which is not needed anymore.
PiperOrigin-RevId: 683582749
Change-Id: I9a56d9e3f9089f7434708a2cfefdd4f12d186658
setup_vc_env_vars should accepts more parameters than the wrapper previously allowed.
PiperOrigin-RevId: 683192260
Change-Id: Ie6063e0706640856e0f4c9dce3e1f4e8fe1ec9e9
the glob pattern `**/*.bzl` doesn't match anything there, and this is bad for `--incompatible_disallow_empty_glob`. This PR removes the offending line.
Otherwise rules_cc is transitively incompatible with Bazel 6 through the chain stardoc 0.7.0 -> rules_java 7.6.1.
`stardoc` targets are not needed by consumers of the ruleset.