This essentially reverts bazelbuild/bazel#23337 now that the toolchain
configuration has been moved here. clang-cl does support assembly just like
other clang variants and unlike MASM supports assembly using native AT&T syntax
as with regular clang. MSVC-style assembly requires using MASM, which continues
to be available in the MSVC toolchain.
This has previously been discussed in bazelbuild/bazel#24152 and reverted for
Bazel 7.4.1 in bazelbuild/bazel#24211. Ideally, we'd want to have some mechanism
to make assembler selection configurable and support several kinds of asm syntax
in the future.
*** Reason for rollback ***
Breaks cc_builtin_tests
*** Original change description ***
Copybara Merge: https://github.com/bazelbuild/rules_cc/pull/257
BEGIN_PUBLIC
Copybara import of the project:
--
12a8bd59af by Fabian Meumertzheim <fabian@meumertzhe.im>:
Move static library validation helper to `ar_files`
It doesn't need to be staged for every compile or link action. The action that uses it stages `all_files`.
END_PUBLIC
***
PiperOrigin-RevId: 695300596
Change-Id: If10c95c1867716c82a09ad3acdfd479beedcc6c5
This ensures that markdown files also have //third_party/* labels changed to external-friendly @foo// labels.
PiperOrigin-RevId: 694229457
Change-Id: I7f3bd56f0a196112a82159d6f47f8285049fc324
BEGIN_PUBLIC
Copybara import of the project:
--
0c245a456a by Ivo List <ilist@google.com>:
Revert "Remove cc_proto_library from defs.bzl"
This reverts commit b15fed2409.
--
d4311f4bdd by Ivo List <ilist@google.com>:
Move back WORKSPACE.bzlmod (unrevert)
--
e62ddd085a by Ivo List <ilist@google.com>:
Rename protobuf to com_google_protobuf
This keeps compatiblity with WORKSPACE mode in older Bazel versions
--
0e1618fa83 by Ivo List <ilist@google.com>:
Adding deprecated comment
--
a272300c18 by Ivo List <ilist@google.com>:
Restore # @unsorted-dict-items
END_PUBLIC
COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_cc/pull/269 from comius:add-back-cc_proto_library a272300c18
PiperOrigin-RevId: 694079850
Change-Id: Iaa57586636997fd3db9cf9289bddc40c673033c9
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.