Commit Graph

583 Commits

Author SHA1 Message Date
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
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
Copybara-Service aba461762f Merge pull request #250 from bazelbuild:Wyverald-patch-1
PiperOrigin-RevId: 683088860
Change-Id: I8aae0bbe569e834bc4d1d46dcee29c1c2ee51a64
2024-10-07 01:59:36 -07:00
Copybara-Service 37dacbbcf2 Merge pull request #249 from meteorcloudy:stardoc-dev
PiperOrigin-RevId: 683088422
Change-Id: Id6308c12494f4b591fd1d47ffbe84cb3b01b745d
2024-10-07 01:57:42 -07:00
Xùdōng Yáng 5cbd830262
Fix empty glob in cc/private/BUILD
the glob pattern `**/*.bzl` doesn't match anything there, and this is bad for `--incompatible_disallow_empty_glob`. This PR removes the offending line.
2024-10-04 22:54:53 +02:00
Fabian Meumertzheim 083ace4f11 Make stardoc a dev dependency
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.
2024-10-04 15:07:57 +02:00
Copybara-Service 7343c660a4 Merge pull request #244 from keith:ks/allow-extra-args-to-cc_sysroot
PiperOrigin-RevId: 682280945
Change-Id: I1f0256f6c99dd1e67efdcd08145700e10ab26e6a
2024-10-04 05:25:37 -07:00
Copybara-Service 565dbd65bd Merge pull request #245 from keith:ks/add-objc_compile-to-compile_actions
PiperOrigin-RevId: 682280777
Change-Id: If9c3a8aa883f7630d9a21d09e65c3c7a230140f2
2024-10-04 05:24:32 -07:00
Googler fd72f9e62a Fix rules_cc copybara
PiperOrigin-RevId: 682280542
Change-Id: Ie5f9dbc05f4d87dbe14b2392a21a23ef0c3ea9a4
2024-10-04 05:23:24 -07:00
Copybara-Service b1bea517b7 Merge pull request #240 from bazelbuild:comius-patch-1
PiperOrigin-RevId: 682269919
Change-Id: Iae32802a2d92a79f9791708dceeafc8b1fb51f10
2024-10-04 04:41:30 -07:00
Ivo List b6db47b84b Add bazel version 2024-10-04 13:28:28 +02:00
Ivo List 6a6e870a20 Fix url 2024-10-04 13:28:28 +02:00
Ivo List 85e02e42b3 Adding maintainers 2024-10-04 13:28:28 +02:00
Armando Montanez e8989401d5 Address more comments 2024-10-03 19:48:19 -07:00
Armando Montanez 4ac204f4ed Run buildifier 2024-10-03 10:27:34 -07:00
Armando Montanez 08752d184e Remove bzlmod lockfile in example 2024-10-03 10:12:56 -07:00