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
This target will eventually be the canonical place for C++ toolchain
type. Currently the actual target resides in @bazel_tools, but that will
soon change.
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
When cpu value is not enough to distinguish between two toolchains, we use the compiler value. In that case, the user needs to specify the compiler value for all cc_toolchain_config rules, even for the ones with unique cpu. This cl fixes the allowed values in the compiler attribute to account for the values from unique toolchains.
Issue #5380
RELNOTES: None.
PiperOrigin-RevId: 239396228