Commit Graph

22 Commits

Author SHA1 Message Date
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 2f8c04c044 Automatic code cleanup.
PiperOrigin-RevId: 456494185
Change-Id: I9aaefff0976cca2b68646970c8d4675c8e122d19
2022-06-22 06:02:29 -07:00
Christopher Peterson Sauer e0dad88a07 Move examples from deprecated @rules_cc//cc:find_cpp_toolchain -> @bazel_tools//tools/cpp:toolchain_utils.bzl 2022-04-11 16:38:30 -07:00
Christopher Peterson Sauer ab8b67a0ab Move examples from deprecated find_cpp_toolchain -> find_cc_toolchain 2022-04-05 23:58:12 -07:00
Googler 426f721323 Automatic code cleanup.
PiperOrigin-RevId: 407085810
Change-Id: I6cac435d8e0e89f97405c7b3923d1891da78740b
2021-11-02 08:13:14 -07:00
Googler 88ef31b429 Update rules_cc to use the correct toolchain type (@bazel_tools//tools/cpp:toolchain_type).
PiperOrigin-RevId: 361158816
Change-Id: Ief011b23ddb9bdf3b49237f90fa631b6f916e8de
2021-03-05 09:10:23 -08:00
Copybara-Service 7bd0e49cfb Merge pull request #85 from benjaminp:modern-linking
PiperOrigin-RevId: 341368143
Change-Id: I9b86beeb90f6df6d3564209f1e97ada4ea7bc319
2020-11-09 02:52:23 -08:00
Googler 991eb349bf Internal change
PiperOrigin-RevId: 340301767
Change-Id: Iccab5010d3fd6e77c08fcdc140cdc1e461185b0d
2020-11-02 13:19:59 -08:00
Googler 699ec52985 Internal change
PiperOrigin-RevId: 339925655
Change-Id: Icde35bf6acb72a382e0253fcf9fb5a10d80a5feb
2020-10-30 13:05:57 -07:00
Googler 16ad606329 Internal change
PiperOrigin-RevId: 339887089
Change-Id: Ic511ced72381f847f5d1b9159f299b6e474a47de
2020-10-30 09:41:38 -07:00
Benjamin Peterson 8994fb0fe1 Adjust c archive example for modern linker input API. 2020-10-26 20:31:47 -05:00
Googler f95239adde Update rules_cc to use the toolchain transition.
This is phase 2 of of the switch to toolchain transitions. See https://github.com/bazelbuild/bazel/issues/11584 for details.

PiperOrigin-RevId: 334808134
Change-Id: Ie198b07359d4fd45368755c4cc223e397f0e8fb0
2020-10-01 07:19:37 -07:00
Googler 4de26b53a6 Remove need for exported_by or linked_statically_by
For now we will restrict allowed exports to the same package. At the same time
static_deps should be used to take into account what should be linked into a
shared library.

RELNOTES:none
PiperOrigin-RevId: 294668451
Change-Id: Ia087519106983bfa9a980e471d3102ab391a53eb
2020-02-12 08:01:50 -08:00
Googler 262ebec3c2 Fix buildifier warnings in @rules_cc
Fixes:

* Enabled buildifier on the Bazel CI again
* Added Skydocs where missing
* Moved public files out of .../private/... (e.g. cc_toolchain_config_lib.bzl)
* Reformatted
* Removed unused loads
* Using relative labels for cc_configure related files
* Added development dependency on rules_proto
    * they're not in the federation yet, so hand rolling in rules_cc's WORKSPACE file
* Added development dependency on rules_python (from federation)
* Cleaned up copybara (notable change - not using @rules_cc in labels inside rules_cc repo)
* Made cc_flags_supplier usable internally
* Moved load statements to the top of the bzl file
* Moved runfiles to the tools directory
* Unified toolchain_utils.bzl and find_cc_toolchain.bzl

RELNOTES: None.
PiperOrigin-RevId: 276479521
Change-Id: I3196896061fa2ee61a3efb130c214d288782066a
2019-10-24 07:01:25 -07:00
Googler 4a1c578fb0 C++: Move tools/cpp from bazel_tools to rules_cc
Here we are duplicating bazel_tools/tools/cpp. The goal is for the BUILD files in bazel_tools/tools/cpp to have an alias that point to rules_cc. Then later on with the incompatible flag these aliases will no longer be valid.

Working towards #8743

RELNOTES:none
PiperOrigin-RevId: 264604076
Change-Id: I389702793a1a95b0990dce93577de2b7182e2e6b
2019-08-21 07:30:04 -07:00
Googler b7fe9697c0 C++: Add two more rules to defs.bzl in rules_cc
These rules are in bazel_tools.

RELNOTES:none
PiperOrigin-RevId: 259298756
Change-Id: I9ed4b8f3cd712adc889a950765c96b5b68a5d43c
2019-07-22 04:17:22 -07:00
Googler d36c8d400c Refactor rules_cc to follow https://docs.bazel.build/versions/master/skylark/deploying.html
RELNOTES: None.
PiperOrigin-RevId: 253736769
Change-Id: Ib13ecb077559f890aa3cc207b7ec1a53ac18d553
2019-06-18 00:21:44 -07:00
Marcel Hlopko 6cd7e75fc4 Update examples for platforms 2019-05-24 14:52:19 +02:00
Googler eeec015f3e Update rules_cc for --incompatible_enable_cc_toolchain_resolution
[Copybara import of https://github.com/bazelbuild/rules_cc/pull/14]

https://github.com/bazelbuild/bazel/issues/7260
Merge 3e6d3b9a4a into b308aae57f

PiperOrigin-RevId: 248296402
2019-05-15 02:19:39 -07:00
hlopko b308aae57f Add ctx argument to cc_common.configure_features
In order to migrate C++ rules to platforms, we need the access to the C++
configuration fragment in Starlark APIs. All existing APIs have already access
to it, but cc_common.configure_features doesn't. This change adds a
ctx argument to configure_features.

This is the migration needed for
https://github.com/bazelbuild/bazel/issues/7793, and is part of the effort for
https://github.com/bazelbuild/bazel/issues/6516.

If the rule doesn't depend on cpp fragment yet, you will have to add `fragments
=['cpp']` argument to the rule() call.

Note that this behavior is only available in Bazel 0.25 (to be released this month).

RELNOTES: None.
PiperOrigin-RevId: 247171967
2019-05-08 01:46:21 -07:00
Googler 2d3bc12294 Remove duplication of feature_configuration
RELNOTES: None.
PiperOrigin-RevId: 236652129
2019-03-04 07:53:44 -08:00
hlopko 3d5980e5cb Add example writing custom rule that depends and is dependable from rules_cc
RELNOTES: None.
PiperOrigin-RevId: 235869541
2019-02-27 00:37:05 -08:00