Commit Graph

34 Commits

Author SHA1 Message Date
Fabian Meumertzheim 8395ec0172 Copybara Merge: https://github.com/bazelbuild/rules_cc/pull/263
BEGIN_PUBLIC
Copybara import of the project:

--
82e44f3c47 by Fabian Meumertzheim <fabian@meumertzhe.im>:

Copy over runfiles library from Bazel

The runfiles library can be maintained independently of Bazel releases and bazel_tools can refer to it via an alias.

--
885d333d55 by Fabian Meumertzheim <fabian@meumertzhe.im>:

Switch to new include path and namespace

--
b8cd815963 by Fabian Meumertzheim <fabian@meumertzhe.im>:

Fix CI

--
41b7d48ed8 by Fabian Meumertzheim <fabian@meumertzhe.im>:

Silence warnings

--
b97a30e8bb by Fabian Meumertzheim <fabian@meumertzhe.im>:

Remove per_file_copt

END_PUBLIC

PiperOrigin-RevId: 697942902
Change-Id: I10a6c9baf0464722fca026db99cf572acfd159f1
2024-11-19 02:58:45 -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
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 2b8d08c910 Use rules_shell 2024-11-06 14:21:54 +01: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
Yun Peng f7ca57feac Restore compatibility with Bazel 6 2024-10-11 18:23:48 +02: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 013a082858 Redirect cc_proto_library to protobuf
PiperOrigin-RevId: 683876696
Change-Id: I0444b3b3bc3ac67bb641d82fe1d67117a6e2bcae
2024-10-08 21:18:29 -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
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
Googler c2549f6eb0 Sync cc toolchain from Bazel's tools/cpp
- @bazel_tools//tools/cpp:toolchain_type is not moved.
- Added cc/toolchains/toolchain_config_utils.bzl for exposing util functions for cc toolchain configuration.

Closes https://github.com/bazelbuild/rules_cc/pull/247

Working towards https://github.com/bazelbuild/bazel/issues/23809

PiperOrigin-RevId: 681913803
Change-Id: I16ff456a212ab0e579c137bd74344255f4e49bd8
2024-10-03 09:32:38 -07:00
Googler 91f050e461 Release rules_cc 0.0.10
PiperOrigin-RevId: 674308086
Change-Id: I1b673c7b1c04e3d47b826160903357fa1dbb3ba9
2024-09-13 08:30:29 -07:00
Ivo List 7a67e9887b Copybara Merge: https://github.com/bazelbuild/rules_cc/pull/238
BEGIN_PUBLIC
Copybara import of the project:

--
2803a12428 by Ivo List <ilist@google.com>:

Prepare for release 0.0.10-rc2

--
3423c73208 by Ivo List <ilist@google.com>:

Format WORKSPACE

--
a99403a6b0 by Ivo List <ilist@google.com>:

Touch module

--
258d8c9f24 by Ivo List <ilist@google.com>:

Revert "Touch module"

This reverts commit a99403a6b0.

END_PUBLIC

COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_cc/pull/238 from comius:release-0.0.10-rc2 258d8c9f24
PiperOrigin-RevId: 673358956
Change-Id: Iabc9c29e6f168cfdfd2f0657438b71654f470cc9
2024-09-11 05:56:57 -07:00
Googler ca8483971c Automated rollback of commit 0f352c3497.
*** Reason for rollback ***

Rollforward with fix for b/365154741

*** Original change description ***

Automated rollback of commit 0bc1ba56ef.

*** Reason for rollback ***

TAP failures in Bazel/Blaze, see b/365154741 and discussion at https://chat.google.com/room/AAAAXE3XKrY/_e3TpBFJvus

*** Original change description ***

Add user-facing documentation for cc_tool_map

BEGIN_PUBLIC

Add user-facing documentation for cc_tool_map

Adds user-facing documentation for the cc_tool_map toolchain rule, including an example and higher level analogies.

END_PUBLIC

***

***

PiperOrigin-RevId: 672000172
Change-Id: If7ad64e2378a2016d389a3718944aa04bc5e9759
2024-09-06 23:05:56 -07:00
Googler 0f352c3497 Automated rollback of commit 0bc1ba56ef.
*** Reason for rollback ***

TAP failures in Bazel/Blaze, see b/365154741 and discussion at https://chat.google.com/room/AAAAXE3XKrY/_e3TpBFJvus

*** Original change description ***

Add user-facing documentation for cc_tool_map

BEGIN_PUBLIC

Add user-facing documentation for cc_tool_map

Adds user-facing documentation for the cc_tool_map toolchain rule, including an example and higher level analogies.

END_PUBLIC

***

PiperOrigin-RevId: 671898382
Change-Id: Iead81a71adb17dff46b1b442471e595769fb5c2e
2024-09-06 14:50:15 -07:00
Googler 0bc1ba56ef Add user-facing documentation for cc_tool_map
BEGIN_PUBLIC

Add user-facing documentation for cc_tool_map

Adds user-facing documentation for the cc_tool_map toolchain rule, including an example and higher level analogies.

END_PUBLIC

PiperOrigin-RevId: 671777889
Change-Id: Ib53de76f355db43a9530f7cbe11face3c9219675
2024-09-06 09:01:28 -07:00
Googler 2351aa42b1 Make toolchains use directory markers instead of strings.
BEGIN_PUBLIC
Make toolchains use directory markers instead of strings.

You now refer to this instead of a string containing the repo mapped path.
END_PUBLIC

PiperOrigin-RevId: 639946886
Change-Id: I409be7b7002252b06562a2982a2568e79811877d
2024-06-03 16:20:34 -07:00
Googler e658433e23 No public description
PiperOrigin-RevId: 613579953
Change-Id: I4aea8af1b3db8eb532c7c9296fc4dfa0c2ff9481
2024-03-07 07:40:02 -08:00
Googler 2e780ceda9 BEGIN_PUBLIC
Add support for testing rules_cc's new toolchains with rules_testing.
END_PUBLIC

PiperOrigin-RevId: 608769646
Change-Id: I1a698355e5e977cc86eedc7cf6e8e0f888593cb8
2024-02-20 15:54:10 -08:00
Yun Peng fb2ace54c3
Update MODULE.bazel 2023-09-19 10:05:03 +02:00
Yun Peng a943a35fc8
Update MODULE.bazel 2023-09-19 09:58:14 +02:00
Yun Peng 009750537d
Register cc toolchain from @bazel_tools
The one located in rules_cc isn't yet in sync.
2023-09-19 09:57:24 +02:00
Mend Renovate 67d307adad
Update dependency platforms to v0.0.7 2023-07-28 21:37:53 +00:00
Fabian Meumertzheim b0e6fee91f Fix MODULE.bazel formatting
Required due to a new buildifier release.
2023-01-18 10:28:06 +01:00
Fabian Meumertzheim 66cf3048e9 Copybara Merge: https://github.com/bazelbuild/rules_cc/pull/165
BEGIN_PUBLIC
Copybara import of the project:

--
56e69b82484f1a9fb55d8173cc112f9f608f3581 by Fabian Meumertzheim <fabian@meumertzhe.im>:

Simplify WORKSPACE setup and update ancient deps

By removing a single unused `bzl_library` target, rules_cc no longer has
any dependencies that would need to be loaded by a dependency macro. The
existing macro is made a no-op.

The few needed Bazel Federation dependencies are inlined and, in the
case of bazel_skylib and abseil-py, updated to modern versions.

Also reorders `WORKSPACE` to list direct dependencies first and keeps
`MODULE.bazel` in sync with the dependency versions used in WORKSPACE.

The `ubuntu1604` CI pipeline is removed as the version of Python used by
it is no longer supported and the distribution is EOL. Instead, a new
pipeline is added to check the Bzlmod build.

END_PUBLIC

COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_cc/pull/165 from fmeum:fix-workspace-module 56e69b82484f1a9fb55d8173cc112f9f608f3581
PiperOrigin-RevId: 501245864
Change-Id: Ib71ad910705807a00929a76774387a38d2da0f9f
2023-01-11 04:33:23 -08:00
Fabian Meumertzheim 48881f1f45 The auto-configured toolchains provided by Bazel itself have diverged heavily from the version maintained in this repo. There is no need to maintain this duplication until Starlarkification has progressed succiciently for rules_cc to be the source of truth for them.
This is particularly relevant for Bzlmod, which currently uses the toolchains defined in rules_cc. As a result, Bazel C++ builds will use subtly different toolchains depending on whether --enable_bzlmod is used or not. This is fixed by loading toolchain detection logic from @bazel_tools in the module extension.

Closes #163

PiperOrigin-RevId: 501199523
Change-Id: I01f263d37495d0c5dd070c8a32945898d1d639c5
2023-01-11 00:12:08 -08:00
Ivo List 0f93f26016 Bump version 2022-09-23 14:42:18 +00:00
Yun Peng 4ae6132a12 Make buildifier happy 2022-09-19 14:03:31 +02:00
Yun Peng 74f87ea2ba
Fix MODULE.bazel file
The next release for rules_cc would be 0.0.3, and migrate to new toolchain registration API.
2022-09-19 14:00:24 +02:00
Googler 3eaa3c7f88 Remove unnecessary tests from rules_cc
They are now part of the bazelbuild/bazel repository.

Copies buildifier changes contributed by Keith in https://github.com/bazelbuild/rules_cc/pull/128

RELNOTES:none
PiperOrigin-RevId: 435312636
Change-Id: I4d5d2f58d90026c0cdfb5c0a90709de7c28c6ccd
2022-03-17 04:50:16 -07:00
Yun Peng 8e7357c5cc Move extensions.bzl to //cc to make buildifier happy 2021-11-05 12:21:01 +01:00
Yun Peng 890aeb2860 Modularize rules_cc 2021-10-07 16:04:58 +02:00