We're working on removing C++ toolchain autoconfiguration logic out of Bazel,
and moving towards using rules_cc repository for it. Some bzl files will no
longer be available through bazel/tools/cpp/*, but through
@rules_cc/cc/*.
RELNOTES: None.
PiperOrigin-RevId: 279935457
Change-Id: I3bae259548dacc5c6789efe0f27dd07738c1057c
Labels in toolchains attribute need to include the repository, otherwise the resolution won't work.
RELNOTES: None.
PiperOrigin-RevId: 279347045
Change-Id: Iba1eb8bb677771e2c089ab6bc1b5e019c4da434e
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
This commit allows the creation of distributions, with 0.0.1 being the first version.
See distro/README.md for details on how to build a release.
This commit also uses a new version of the Bazel federation that contains rules_pkg 0.2.2 instead of 0.2.1.
There are still some problems with the WORKSPACE stanza that is being printed by the release notes generation script, though:
- It references a //cc:deps.bzl file, which doesn't exist. I have to modify the scripts in rules_pkg to support a flag like 'has_deps'.
- It doesn't support the Bazel federation yet, since it always tells users to download code from the rules_cc repository.
BEGIN_PUBLIC
Remove unused load statements from .bzl files
After transitive loads have been disabled in Blaze, unused load statements have
no effect (besides not useful memory consumption).
The CL has been created automatically by calling `buildifier --lint=fix --warnings=load` on all .bzl files.
The following additional command were run on all affected files to clean them up:
* buildifier -a -v --lint=fix --warnings=load-on-top
Moves all load statements to the top of a file
* buildifier -a -v --lint=fix --warnings=same-origin-load
Compresses all load statements from the same .bzl file to one load statement
END_PUBLIC
PiperOrigin-RevId: 269552258
Change-Id: I85ae6bf3467bf560ac3e0ab2470f864abb89e8e6
Usage: CC=clang bazel build //foo:bar --features=thin_lto -c opt
RELNOTES: Bazel now supports ThinLTO builds on Linux for Clang versions >= 6.0. ThinLTO can be enabled through --features=thin_lto
PiperOrigin-RevId: 265649618
Change-Id: I68a38b8b8c1480e3b73d8e6f24e9dafece2c7de6
We now have copies of .bzl files that we have to keep in sync between @rules_cc and @bazel_tools/tools
I propose to re-enable the Buildifier presubmit once this issue is resolved.
*** Original change description ***
Run Buildifier as part of the presubmit.
As a result we will catch some errors already in GitHub, and not later in Critique when it's harder to fix them.
***
PiperOrigin-RevId: 265636234
Change-Id: I10730665134240b3f47950e0e8fa0add8e0bd591
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
As a result we will catch some errors already in GitHub, and not later in Critique when it's harder to fix them.
PiperOrigin-RevId: 262967050
Change-Id: If598cea7cf9283203bad94533a6bb5be3349e118
With CROSSTOOL not existing anymore, the comparison script can continue being useful in refactoring Starlark toolchain config rules.
RELNOTES: None.
PiperOrigin-RevId: 262544859
Change-Id: I633fdc4c09c7643d6e5d1c10537efa3c9a82003c
We don't need to select a toolchain by the identifier when we get the proto from Starlark rules because in that case the proto contains a single toolchain.
The difference in toolchain_identifier field between the first and the second proto file will be caught as any other field.
RELNOTES: None.
PiperOrigin-RevId: 262543753
Change-Id: I1e66ee302bf551ade883c217f6269f44382393c0
*** Reason for rollback ***
Rolling back. No time before 1.0.
*** Original change description ***
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: 258756552
Change-Id: Ia44c0b5084ed9b28efbf9058e3dc29696db86fac
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: 258344117
Change-Id: I5c0ffb1c7b501facabb543ad57440ea067ab3d34
This is in preparation for --incompatible_load_cc_rules_from_bzl
Closes #8744.
PiperOrigin-RevId: 256969979
Change-Id: I4f73790b9204156a5380e97e6bda70e2066d04a7