Commit Graph

597 Commits

Author SHA1 Message Date
Armando Montanez aa17322b76 Merge branch 'main' into move_target_specific_capabilities 2024-11-07 14:23:42 -08:00
Armando Montanez 6a14cd9585 Revert "Another docs workaround"
This reverts commit 3500df7958.
2024-11-07 14:22:46 -08:00
Googler 1698d2bf3a Apply external repo transforms to all migrated files
This ensures that markdown files also have //third_party/* labels changed to external-friendly @foo// labels.

PiperOrigin-RevId: 694229457
Change-Id: I7f3bd56f0a196112a82159d6f47f8285049fc324
2024-11-07 13:29:51 -08:00
Armando Montanez 3500df7958 Another docs workaround 2024-11-07 12:45:40 -08:00
Armando Montanez d2920b11e8 Revert unrelated docs change 2024-11-07 12:40:07 -08:00
Armando Montanez d6ec6afe0f Buildifier fixes 2024-11-07 12:14:18 -08:00
Armando Montanez 19ae897ce4 Make external features implyable 2024-11-07 12:11:20 -08:00
Armando Montanez a8731597d1 Remove unexpected loads 2024-11-07 12:07:49 -08:00
Armando Montanez d565648723 Update docs 2024-11-07 12:06:40 -08:00
Armando Montanez caa46ac069 Merge branch 'main' into move_target_specific_capabilities 2024-11-07 11:57:56 -08:00
Armando Montanez b8045d5626 Properly support target-specific capabilities
Changes supports_pic and supports_dynamic_linker features to
cc_target_capability rules since the capability is tied to target
platform capabilities rather than tool capabilities.
2024-11-07 11:57:29 -08:00
Armando Montanez 5a91c52992 Revert "Move target-specific capabilities back to features"
This reverts commit 272f4173f5.
2024-11-07 08:50:07 -08:00
Ivo List 28cf2e8160 Copybara Merge: https://github.com/bazelbuild/rules_cc/pull/269
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
2024-11-07 05:14:59 -08:00
Googler da65f24105 Add release automation for rules_cc
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
2024-11-07 03:17:54 -08:00
Armando Montanez 272f4173f5 Move target-specific capabilities back to features
Some features with the "supports_*" naming style were moved to be tool
capabilites despite being target capabilities rather than toolchain tool
capabilities. This change restores them to their original location so
they can be enabled at the cc_toolchain level instead.
2024-11-06 18:04:28 -08:00
Googler 7348965146 Bump rules_cc version to 0.0.14
BEGIN_PUBLIC
Bump rules_cc version to 0.0.14
END_PUBLIC

PiperOrigin-RevId: 693728781
Change-Id: Ie40637a2a64eca9e2cce9bfe451b69d29ab0fdfd
2024-11-06 08:01:01 -08:00
Ivo List 891cf0fc2c Merge remote-tracking branch 'origin/main' 2024-11-06 16:49:18 +01:00
Googler f5044c0097 Fix rules_shell copybara
BEGIN_PUBLIC
Internal change
END_PUBLIC

PiperOrigin-RevId: 693722123
Change-Id: I97ace26fc9275ff7417302a6f39ab90002c733f4
2024-11-06 07:36:04 -08:00
Googler 7e5f6a9391 Remove defs.bzl usages
BEGIN_PUBLIC
Remove defs.bzl usages
END_PUBLIC

PiperOrigin-RevId: 693709660
Change-Id: I1c92999e23c153f865ad68ab802d907abaea74eb
2024-11-06 07:35:53 -08:00
Copybara-Service 76413676fc Merge pull request #265 from comius:rules-shell-in-cc
PiperOrigin-RevId: 693699461
Change-Id: Icd113a5668da50f186836ca79036f6620ad0bfce
2024-11-06 07:35:39 -08:00
Ivo List ba0dbe8852
Merge pull request #265 from comius/rules-shell-in-cc
Use sh rules from rules_shell
2024-11-06 15:16:51 +01:00
Ivo List 2b8d08c910 Use rules_shell 2024-11-06 14:21:54 +01:00
Ivo List 5ebe5a71fe Remove bad target 2024-11-06 14:19:32 +01:00
Copybara-Service a5827bf372 Merge pull request #256 from fmeum:235-better-tool-map
PiperOrigin-RevId: 691529088
Change-Id: Idbda52a6b2eecbdefd83b2c89a0c7eb01dfee074
2024-10-30 13:15:53 -07:00
Googler b15fed2409 Remove cc_proto_library from defs.bzl
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
2024-10-30 09:22:18 -07:00
Copybara-Service 597be676dd Merge pull request #234 from alexeagle:patch-2
PiperOrigin-RevId: 691379288
Change-Id: I4c48b399a3689caf2c0632856aa73180de4c5995
2024-10-30 05:18:29 -07:00
Copybara-Service 0d44d3ee76 Merge pull request #260 from hauserx:main
PiperOrigin-RevId: 691373476
Change-Id: I7a09129bdc7ac32bbbdb5f06a586bc0ceee2a8b7
2024-10-30 04:54:20 -07:00
Copybara-Service 0640261093 Merge pull request #257 from fmeum:validate-library
PiperOrigin-RevId: 691372917
Change-Id: Idebbc95f1e24990ec61d5224fbc28cd238a8fdbd
2024-10-30 04:51:22 -07:00
Copybara-Service 7381e24175 Merge pull request #198 from zaucy:emscripten-compiler
PiperOrigin-RevId: 691372690
Change-Id: I02e074a82591ba4112fe8449c0a7a86a35d64777
2024-10-30 04:49:48 -07:00
Copybara-Service faeafdb828 Merge pull request #253 from meteorcloudy:fix_compatibility
PiperOrigin-RevId: 689379342
Change-Id: Ia90576c00b917bf58a53362981d1f3e775d6dfd5
2024-10-24 07:51:08 -07:00
Googler f4e71c3a0c Update CODEOWNERS for rules_cc
PiperOrigin-RevId: 689375444
Change-Id: Ie4d9261f85290e25d76d634293bb7add9babea57
2024-10-24 07:37:56 -07:00
Googler f6c19dd20f Remove outdated toolchain README contents.
BEGIN_PUBLIC

Remove outdated toolchain README contents.

END_PUBLIC

PiperOrigin-RevId: 689365688
Change-Id: I78f3be0651e8aeaf842c3ea06d63161dd7ab42b4
2024-10-24 07:02:04 -07:00
Grzegorz Lukasik 7c39729245 Remove redundant with_feature_set for sanitizers
It uses the same name as the feature itself.
2024-10-23 10:52:47 +02:00
Googler 9e3e907560 Exclude intentionally broken build target from GH CI
BEGIN_PUBLIC

Exclude intentionally broken build target from GH CI

Gets GitHub CI passing again.

END_PUBLIC

PiperOrigin-RevId: 687335065
Change-Id: Icb3d9d1f7b6ccfd1e19c9174ad3481ecc2dfcc7f
2024-10-18 09:46:57 -07:00
Fabian Meumertzheim 12a8bd59af 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`.
2024-10-15 14:38:18 +02:00
Fabian Meumertzheim 3d51aaa430 Deduplicate tools for `cc_tool_map`
Fixes #235
2024-10-15 14:30:10 +02:00
Yun Peng f7ca57feac Restore compatibility with Bazel 6 2024-10-11 18:23:48 +02:00
Googler ba3ec91a55 Enable cquery in GitHub CI
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
2024-10-11 03:15:37 -07:00
Googler ae44550707 Add missing defaults for cc_toolchain
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
2024-10-10 23:37:00 -07:00
Googler 4a2d37625b Bump rules_cc version to 0.0.13
PiperOrigin-RevId: 684052002
Change-Id: I91de575a1ad021297787d00f9f95f0d569d9a5d8
2024-10-09 08:46:16 -07:00
Googler 324612d107 Add documentation for `cc_toolchain`
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
2024-10-09 08:44:04 -07:00
Googler 56f4a8bfa1 Add testing for Bazel@HEAD and Bazel 6
PiperOrigin-RevId: 684046113
Change-Id: I98875f8c67b491759f121c21e33ed04ec1d590e0
2024-10-09 08:26:06 -07:00
Copybara-Service 7782be6db1 Merge pull request #237 from armandomontanez:rules-based-toolchain-example
PiperOrigin-RevId: 684024413
Change-Id: I36767bb7452d83749a48342ff447f792979da576
2024-10-09 07:10:20 -07:00
Googler 013a082858 Redirect cc_proto_library to protobuf
PiperOrigin-RevId: 683876696
Change-Id: I0444b3b3bc3ac67bb641d82fe1d67117a6e2bcae
2024-10-08 21:18:29 -07:00
Googler a2949e206e Fix toolchain argument ordering
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
2024-10-08 10:34:59 -07:00
Armando Montanez b82c650543 Merge branch 'main' into rules-based-toolchain-example 2024-10-08 10:12:35 -07:00
Googler eeed2a9ab7 Remove crostool migration tools
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
2024-10-08 05:35:42 -07:00
Googler b96ca29763 Directly exposing functions in toolchain_config_utils.bzl
setup_vc_env_vars should accepts more parameters than the wrapper previously allowed.

PiperOrigin-RevId: 683192260
Change-Id: Ie6063e0706640856e0f4c9dce3e1f4e8fe1ec9e9
2024-10-07 08:24:18 -07:00
Googler 19a278e626 Prepare for 0.0.12 release
PiperOrigin-RevId: 683189389
Change-Id: I6092c6d9716502cb236c307b9761d88a09b41334
2024-10-07 08:14:05 -07:00
Googler be5e15fc27 Prepare version 0.0.11 release
PiperOrigin-RevId: 683098220
Change-Id: I85a6ea0c63070e4a880a67f3063e1c2c4bef31ac
2024-10-07 02:36:13 -07:00