diff options
author | 2017-08-28 22:43:32 +0200 | |
---|---|---|
committer | 2017-08-29 13:32:14 +0200 | |
commit | 03755ea2a9830d94fdb23baa3b37bb11c2faa392 (patch) | |
tree | 0884dfe0d360aed55e8febc2b02d1271a71894d7 /tools/cpp | |
parent | 8c76d5f82d290b46d67189bcc8bd08a441094da1 (diff) |
Automated rollback of commit 363413110f3a63a11d900864be1852adbaed2899.
*** Reason for rollback ***
Breaks //src/test/shell/bazel:bazel_bootstrap_distfile_test:
INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO: ./compile.sh compile /path/to/bazel
🍃 Building Bazel from scratch......
🍃 Building Bazel with Bazel.
.WARNING: /tmp/bazel_cHivhPBc/out/external/bazel_tools/WORKSPACE:1: Workspace name in /tmp/bazel_cHivhPBc/out/external/bazel_tools/WORKSPACE (@io_bazel) does not match the name given in the repository's definition (@bazel_tools); this will cause a build error in future versions.
ERROR: in target '//external:cc_toolchain': error loading package '@local_config_cc//': Extension file not found. Unable to load file '@local_config_cc//:dummy_toolchain.bzl': file doesn't exist or isn't a file.
INFO: Elapsed time: 3.343s
ERROR: Could not build Bazel
Found by git bisect.
*** Original change description ***
Add a new toolchain type for c++. In order to do this, PlatformConfiguration is made a legal configuration fragment for every rule class.
Add a default "dummy" c++ toolchain to prevent resolution errors when legacy toolchain selection logic is used. Add toolchain mocks to java and shell tests.
PiperOrigin-RevId: 166750885
Diffstat (limited to 'tools/cpp')
-rw-r--r-- | tools/cpp/BUILD | 15 | ||||
-rw-r--r-- | tools/cpp/BUILD.static | 15 | ||||
-rw-r--r-- | tools/cpp/BUILD.tpl | 15 | ||||
-rw-r--r-- | tools/cpp/dummy_toolchain.bzl | 23 |
4 files changed, 0 insertions, 68 deletions
diff --git a/tools/cpp/BUILD b/tools/cpp/BUILD index eb75333e75..1a4dc674ea 100644 --- a/tools/cpp/BUILD +++ b/tools/cpp/BUILD @@ -204,18 +204,3 @@ filegroup( name = "link_dynamic_library", srcs = ["link_dynamic_library.sh"], ) - -toolchain_type(name = "toolchain_type") - -# A dummy toolchain is necessary to satisfy toolchain resolution until platforms -# are used in c++ by default. -# TODO(b/64754003): Remove once platforms are used in c++ by default. -toolchain( - name = "dummy_cc_toolchain", - toolchain = "dummy_cc_toolchain_impl", - toolchain_type = ":toolchain_type", -) - -load(":dummy_toolchain.bzl", "dummy_toolchain") - -dummy_toolchain(name = "dummy_cc_toolchain_impl") diff --git a/tools/cpp/BUILD.static b/tools/cpp/BUILD.static index aaadc5bad8..9ae4950d80 100644 --- a/tools/cpp/BUILD.static +++ b/tools/cpp/BUILD.static @@ -115,18 +115,3 @@ filegroup( name = "link_dynamic_library", srcs = ["link_dynamic_library.sh"], ) - -toolchain_type(name = "toolchain_type") - -# A dummy toolchain is necessary to satisfy toolchain resolution until platforms -# are used in c++ by default. -# TODO(b/64754003): Remove once platforms are used in c++ by default. -toolchain( - name = "dummy_cc_toolchain", - toolchain = "dummy_cc_toolchain_impl", - toolchain_type = ":toolchain_type", -) - -load(":dummy_toolchain.bzl", "dummy_toolchain") - -dummy_toolchain(name = "dummy_cc_toolchain_impl") diff --git a/tools/cpp/BUILD.tpl b/tools/cpp/BUILD.tpl index 170fe3f91d..5ea5368c62 100644 --- a/tools/cpp/BUILD.tpl +++ b/tools/cpp/BUILD.tpl @@ -75,18 +75,3 @@ cc_toolchain( strip_files = ":empty", supports_param_files = 1, ) - -toolchain_type(name = "toolchain_type") - -# A dummy toolchain is necessary to satisfy toolchain resolution until platforms -# are used in c++ by default. -# TODO(b/64754003): Remove once platforms are used in c++ by default. -toolchain( - name = "dummy_cc_toolchain", - toolchain = "dummy_cc_toolchain_impl", - toolchain_type = ":toolchain_type", -) - -load(":dummy_toolchain.bzl", "dummy_toolchain") - -dummy_toolchain(name = "dummy_cc_toolchain_impl") diff --git a/tools/cpp/dummy_toolchain.bzl b/tools/cpp/dummy_toolchain.bzl deleted file mode 100644 index c787f7315d..0000000000 --- a/tools/cpp/dummy_toolchain.bzl +++ /dev/null @@ -1,23 +0,0 @@ -# pylint: disable=g-bad-file-header -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Skylark rule that stubs a toolchain.""" -def _dummy_toolchain_impl(ctx): - ctx = ctx # unused argument - toolchain = platform_common.ToolchainInfo() - return [toolchain] - -dummy_toolchain = rule(_dummy_toolchain_impl, attrs = {}) - |