commit | b4c0fb0031ab5c9c2aaae5bca379628a1d58a6a5 | [log] [tgz] |
---|---|---|
author | Marcel Hlopko <hlopko@google.com> | Mon May 27 03:54:06 2019 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Mon May 27 03:55:11 2019 -0700 |
tree | 32e98fad34fee8ef7995b362557a02a617eb332e | |
parent | 120309defcf80fd65f5ecd46e124c95658bc8d84 [diff] |
Split toolchains from cc_toolchains in cc_configure This change modifies which part of cc_configure is executed unconditionally and which only on demand. The root of the problem was the call `register_toolchains(@local_config_cc//:all)`. Because this was appended to the WORKSPACE file, each Bazel project executed the repository (and therefore tried to detect C++ toolchain and its capabilities) even when the C++ toolchain was not needed for the build. This change split `@local_config_cc` into 2 repositories: 1. `@local_config_cc_toolchains` which contains only `toolchain` targets, and doesn't require C++ toolchain to be detected. 2. `@local_config_cc` which contains `cc_toolchain` targets, which do require C++ toolchain to be detected. The point is that toolchain resolution has all the information needed to select the appropriate toolchain without autoconfiguration, therefore C++ toolchain will only be autoconfigured only after we already know it will be selected. This cl is backwards incompatible for projects that relied on `@local_config_cc` containing `toolchain` targets. But because https://github.com/bazelbuild/bazel/issues/7260 is not yet flipped, there are not that many users of toolchains with C++ who manually instantiate `cc_autoconf` rule. Fixes https://github.com/bazelbuild/bazel/issues/7751. Progress towards https://github.com/bazelbuild/bazel/issues/7260. RELNOTES: Repository containing autoconfigured C++ toolchain `@local_config_cc` has been split in 2 - see `local_config_cc_toolchains`. Closes #8459. PiperOrigin-RevId: 250131245
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel only rebuilds what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md
Bazel is released in ‘Beta’. See the product roadmap to learn about the path toward a stable 1.0 release.