Commit Graph

419 Commits

Author SHA1 Message Date
Googler fc88354c6f Automatic code cleanup.
PiperOrigin-RevId: 566245154
Change-Id: Id906c52da9c922cee77782994a63c6b1dc656fc8
2023-09-18 03:04:35 -07:00
Googler 9c1686d2cc Upgrade version of rules_go
Fixes: https://github.com/bazelbuild/rules_cc/issues/195
PiperOrigin-RevId: 564652456
Change-Id: I2bef5c13c19374d2a3e57f6fb14ab84e48bc5a80
2023-09-12 02:17:23 -07:00
Googler b039a551a7 Fix lexicographical order to make Buildifier happy.
PiperOrigin-RevId: 562719963
Change-Id: I8c50b4606a69d5fedc9dd6b7f9768c2399d86ea3
2023-09-05 03:15:26 -07:00
Richard Levasseur b8d9580d80 Automatic code cleanup.
PiperOrigin-RevId: 562018631
Change-Id: I7b324d5b151341033df696f82b68e9f9160ad625
2023-09-01 12:20:38 -07:00
Copybara-Service 7771fb57dd Merge pull request #193 from renovate-bot:renovate/platforms-0.x
PiperOrigin-RevId: 552414057
Change-Id: Idaa9f93597e22571672f3ab14ee628cae8d0e570
2023-07-31 02:05:29 -07:00
Mend Renovate 67d307adad
Update dependency platforms to v0.0.7 2023-07-28 21:37:53 +00:00
Copybara-Service 22d91c627c Merge pull request #192 from alexeagle:patch-1
PiperOrigin-RevId: 549686322
Change-Id: I98922d3245c822a703e32c2ce686890b968ab31c
2023-07-20 11:15:49 -07:00
Alex Eagle f7aa3d5a2f
Update README.md
Explain that the provided toolchain is not hermetic, and point to some options which are.

This was a topic at the Rules Authors SIG meeting on 27 June 2023: https://docs.google.com/document/d/1YGCYAGLzTfqSOgRFVsB8hDz-kEoTgTEKKp9Jd07TJ5c/edit#heading=h.twkfyk2n9ye9
2023-07-19 15:32:02 -07:00
Googler 1583313f41 Fix licensing errors and add default condition for `local_defines`.
PiperOrigin-RevId: 548995629
Change-Id: I0734ca5b64cf37401ec74a339a67f3044321aa7c
2023-07-18 07:27:57 -07:00
Copybara-Service 5d8ef91731 Merge pull request #167 from fmeum:add-compiler-settings
PiperOrigin-RevId: 548940888
Change-Id: Id69973c5014cfe59729cab2d983df24b7422602d
2023-07-18 02:38:23 -07:00
Copybara-Service 84d2878ffc Merge pull request #188 from fmeum:tests-ci
PiperOrigin-RevId: 548924746
Change-Id: Ib201c6dd5c383b2fb8d0bec78c4037df964ab513
2023-07-18 01:25:43 -07:00
Googler 5a8cab742c Add support for expand_if_available for env_entry
PiperOrigin-RevId: 548694860
Change-Id: I90f46902058fe1ac3a75bb25bddbbf6e181fbabd
2023-07-17 08:12:34 -07:00
Fabian Meumertzheim 4e72e665a3 Add well-known compiler `config_setting`s
As of Bazel 6.0.0, all Bazel-provided toolchains report consistent
compiler names that can be matched on with `select`. Having a central
place for `config_setting`s that can be used for this purpose makes it
so that rulesets don't have to define them themselves and moving the
compiler flag out of `@bazel_tools` becomes easier as it is no longer
referenced directly.

Also includes minor fixes to `//tests/...` so that it can be enabled in
CI.
2023-07-10 16:39:33 +02:00
buildbreaker2021 d4c72e3166
Merge pull request #188 from fmeum/tests-ci
Enable `//tests/...` in CI
2023-07-10 16:38:35 +02:00
Fabian Meumertzheim f9e3b89332 Enable `//tests/...` in CI 2023-07-08 00:29:45 +02:00
Googler 1dbb691712 Get rid of unused objcpp_executable type
PiperOrigin-RevId: 539637641
Change-Id: I80f65a738e77b58054121bfe19a47659fb50fc42
2023-06-12 06:53:11 -07:00
Googler 7f0992b0bd Remove `cc_host_toolchain_alias` target.
Right now there should be no difference between `cc_host_toolchain_alias` and `cc_toolchain_alias` rules.
This is a potentially breaking change for Bazel, if something was depending on `current_cc_host_toolchain` try depending on `current_cc_toolchain` instead.

PiperOrigin-RevId: 528762965
Change-Id: Id2d211c61fa06a578a838c054682c3507aa48261
2023-05-02 06:19:53 -07:00
Googler 2e4313aeba Automated rollback of commit 06e9dcf4b7.
*** Reason for rollback ***

Breaking tap/blaze. Example failure: []

*** Original change description ***

Sort action lists to make diffing easier.

***

PiperOrigin-RevId: 523671424
Change-Id: I475ff02bf8efd3c56e489e2de3ba2c3a5639c32e
2023-04-12 05:19:20 -07:00
Googler 06e9dcf4b7 Sort action lists to make diffing easier.
PiperOrigin-RevId: 523639362
Change-Id: I8a43799f58ad1ed5b19ec074fa9cb9a567591f36
2023-04-12 02:07:04 -07:00
Copybara-Service be9ff3eb41 Merge pull request #183 from renovate-bot:renovate/rules_proto-digest
PiperOrigin-RevId: 513165629
Change-Id: Ib58015b1e049cc54a347b86ca781807196a162cf
2023-03-01 01:22:30 -08:00
Renovate Bot 0baf82487f
Update rules_proto digest to e51f588 2023-02-28 15:13:12 +00:00
Copybara-Service 998319083b Merge pull request #182 from renovate-bot:renovate/rules_proto-digest
PiperOrigin-RevId: 511535003
Change-Id: I4d5847e1339bf8fd882dfcb69140b44efb05072e
2023-02-22 10:36:14 -08:00
Renovate Bot adfbe56c12
Update rules_proto digest to 33aba33 2023-02-21 19:32:32 +00:00
Copybara-Service 42f3259960 Merge pull request #180 from silvergasp:patch-2
PiperOrigin-RevId: 510383031
Change-Id: Id0796b560d646fab81dbda1ee98e6adaf68bfa8e
2023-02-17 02:54:21 -08:00
Yannic 507f49698a Update cc_toolchain_config_lib.bzl for bazelbuild/bazel#10967 2023-02-16 10:19:56 -08:00
Googler ad1830946d Remove redundant "# copybara-use-repo-external-label"
Remove redundant tags for copybara to replace labels with labels including the
repository, where there are no labels to substitute after 2f8c04c044.

PiperOrigin-RevId: 510103824
Change-Id: I9b65a6b7f9b48885aec4df5f4723273633be4860
2023-02-16 04:17:58 -08:00
Googler d8dfa8b829 Introduce flag --@rules_cc//:link_extra_libs
Numerous tools override --custom_malloc to add debugging or monitoring runtimes
(see e.g. sanitizers). While this is fine for cases where the tool must also
override malloc to function, in other cases it's simply misuse of
--custom_malloc where no other mechanism exists to link an extra library.

This becomes especially problematic where a runtime library is supposed to be
added in certain configurations that should run in production or other
performance sensitive builds. In these cases, we should _not_ override malloc,
which may also be specified by a cc_binary target. Doing so would introduce
unwanted changes, potentially affecting performance negatively.

This is the @rules_cc counterpart to the equivalent Bazel tools flag
--@bazel_tools//tools/cpp:link_extra_libs. Users that use @rules_cc to build
their C++ projects may use both flags interchangably, however, the @rules_cc
flag should be preferred.

PiperOrigin-RevId: 510103352
Change-Id: Iafccd00ffdb65cb4f953d5acadc451cffc134533
2023-02-16 04:15:10 -08:00
Googler a43f67b72c Automatic code cleanup.
PiperOrigin-RevId: 509526713
Change-Id: I852b1620897d8c6787ca25b6790f245b5bc274f0
2023-02-14 07:49:46 -08:00
Copybara-Service bfeff307f6 Merge pull request #177 from renovate-bot:renovate/bazel_skylib-1.x
PiperOrigin-RevId: 509457484
Change-Id: I1c72c7e256e831fbcae66900ea4be4ea3dcbd1d1
2023-02-14 01:30:01 -08:00
Copybara-Service 74495aa92a Merge pull request #173 from renovate-bot:renovate/io_abseil_py-1.x
PiperOrigin-RevId: 509457306
Change-Id: I89f3f455e5294765b78c61daaaca4d1c6e69b6fc
2023-02-14 01:29:03 -08:00
Copybara-Service 9e14dd8c39 Merge pull request #176 from renovate-bot:renovate/io_bazel_rules_go-0.x
PiperOrigin-RevId: 509176425
Change-Id: Idc28b71ab3580fe7167737d13dbfd760f360db44
2023-02-13 03:09:00 -08:00
Renovate Bot daaae45616
Update dependency bazel_skylib to v1.4.1 2023-02-09 16:37:03 +00:00
Googler 0d68932a68 Automatic code cleanup.
PiperOrigin-RevId: 506908397
Change-Id: I4571c9e947b5878519d5ec291d2fc58566159c84
2023-02-03 08:23:18 -08:00
Copybara-Service fcd9a03875 Merge pull request #175 from renovate-bot:renovate/bazel_skylib-1.x
PiperOrigin-RevId: 506605277
Change-Id: I3ae667cb3ec4a9391f94261965b765560995fd47
2023-02-02 06:44:32 -08:00
Copybara-Service f1ee8d559e Merge pull request #160 from renovate-bot:renovate/rules_proto-digest
PiperOrigin-RevId: 506604382
Change-Id: Id238acc046b708433a49e1059ce3d20a89e10db9
2023-02-02 06:39:40 -08:00
Renovate Bot ae9ab94e9d
Update dependency io_bazel_rules_go to v0.38.1 2023-02-01 02:18:38 +00:00
Renovate Bot 8a612ecbde
Update dependency bazel_skylib to v1.4.0 2023-02-01 02:18:35 +00:00
Renovate Bot e00c2aa151
Update rules_proto digest to 3f1ab99 2023-02-01 02:18:34 +00:00
Copybara-Service ab49224158 Merge pull request #165 from fmeum:fix-workspace-module
PiperOrigin-RevId: 502815989
Change-Id: I4ab8aeb227f699f8d93d6ff787e4927b26cb21be
2023-01-18 02:29:18 -08:00
Fabian Meumertzheim b0e6fee91f Fix MODULE.bazel formatting
Required due to a new buildifier release.
2023-01-18 10:28:06 +01:00
Copybara-Service c7849af112 Merge pull request #154 from keith:ks/move-apple-toolchain-setup-to-apple_support
PiperOrigin-RevId: 502796914
Change-Id: I2cd0481a244db416ec2abb06e05dee0f783b72b5
2023-01-18 00:42:02 -08:00
Renovate Bot 3627f4fdd3
Update dependency io_abseil_py to v1.4.0 2023-01-11 18:15:37 +00:00
Copybara-Service d7c11265cb Merge pull request #166 from fmeum:patch-1
PiperOrigin-RevId: 501245941
Change-Id: Ic064d20847215c65bf01fda2e1941cb497d949bf
2023-01-11 04:34:10 -08: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
Googler bc665f9271 Automated rollback of commit 48881f1f45.
*** Reason for rollback ***

Broke a test

*** Original change description ***

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...

***

PiperOrigin-RevId: 501228335
Change-Id: I858dc3ea44df7ae70b5603f6dc2e082b4540c42a
2023-01-11 02:48:25 -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
Keith Smiley 404bb430e7
Remove entire macOS toolchain
This defaults to C++, and the previous setup will be moved to
apple_support
2023-01-10 08:43:46 -08:00
Keith Smiley 52f5feaf1d
Move Apple toolchain setup to apple_support
Mirrors https://github.com/bazelbuild/bazel/pull/16619
2023-01-10 08:43:45 -08:00
Fabian Meumertzheim cbf01d28ec Delete `cc/version.bzl`
The version has never been updated since the first release and since rules_cc is currently a slim wrapper around Bazel-provided rules, version detection shouldn't be necessary.
2023-01-10 11:02:51 +01:00
Fabian Meumertzheim 06112c7d9e The targets in the old package were either not publicly visible or testonly dependencies and had diverged heavily from @bazel_tools.
Instead, add an alias to the Bazel-provided runfiles library under //cc/runfiles, following https://bazel.build/rules/deploying.

Closes #162

PiperOrigin-RevId: 500929486
Change-Id: I3290c2b836af2313fbf45459c81af24fbde877d0
2023-01-10 02:00:52 -08:00