aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar cpeyser <cpeyser@google.com>2017-09-01 00:15:29 +0200
committerGravatar Vladimir Moskva <vladmos@google.com>2017-09-01 12:28:36 +0200
commit8613c90911990431c7356a48b20504cba479ac4b (patch)
tree253cda56fba4621bebe571c852434f89716232b5 /tools
parenta117235b926eb477299436328a34ad4b1ea0eec0 (diff)
Automated rollback of commit 2b983bdf508e010a3d4ee9dbaf446b7666749799.
*** Reason for rollback *** Breaks rules_go CI *** Original change description *** Rollforward of c++ toolchain-relevant BUILD file and Bazel mocking changes. That is, a c++ toolchain is added, but a Bazel dependency on that toolchain is not. PiperOrigin-RevId: 167198874
Diffstat (limited to 'tools')
-rw-r--r--tools/BUILD2
-rw-r--r--tools/cpp/BUILD15
-rw-r--r--tools/cpp/BUILD.static15
-rw-r--r--tools/cpp/BUILD.tpl15
-rw-r--r--tools/cpp/cc_configure.bzl2
-rw-r--r--tools/cpp/dummy_toolchain.bzl23
-rw-r--r--tools/platforms/BUILD92
7 files changed, 1 insertions, 163 deletions
diff --git a/tools/BUILD b/tools/BUILD
index 0432b126cb..61e9abc1a2 100644
--- a/tools/BUILD
+++ b/tools/BUILD
@@ -51,7 +51,7 @@ filegroup(
"//tools/jdk:package-srcs",
"//tools/jdk:srcs",
"//tools/launcher:srcs",
- "//tools/platforms:srcs",
+ "//tools/platforms:package-srcs",
"//tools/objc:srcs",
"//tools/python:srcs",
"//tools/test:srcs",
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/cc_configure.bzl b/tools/cpp/cc_configure.bzl
index 9d6d29fc82..70e2fd0ff1 100644
--- a/tools/cpp/cc_configure.bzl
+++ b/tools/cpp/cc_configure.bzl
@@ -20,8 +20,6 @@ load("@bazel_tools//tools/cpp:unix_cc_configure.bzl", "configure_unix_toolchain"
load("@bazel_tools//tools/cpp:lib_cc_configure.bzl", "get_cpu_value")
def _impl(repository_ctx):
- repository_ctx.symlink(
- Label("@bazel_tools//tools/cpp:dummy_toolchain.bzl"), "dummy_toolchain.bzl")
cpu_value = get_cpu_value(repository_ctx)
if cpu_value == "freebsd":
# This is defaulting to the static crosstool, we should eventually
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 = {})
-
diff --git a/tools/platforms/BUILD b/tools/platforms/BUILD
index 1b74f106eb..4e788aea2c 100644
--- a/tools/platforms/BUILD
+++ b/tools/platforms/BUILD
@@ -13,95 +13,3 @@ filegroup(
name = "srcs",
srcs = glob(["**"]),
)
-
-# These match values in //src/main/java/com/google/build/lib/util:CPU.java
-constraint_setting(name = "cpu")
-
-constraint_value(
- name = "x86_32",
- constraint_setting = ":cpu",
-)
-
-constraint_value(
- name = "x86_64",
- constraint_setting = ":cpu",
-)
-
-constraint_value(
- name = "ppc",
- constraint_setting = ":cpu",
-)
-
-constraint_value(
- name = "arm",
- constraint_setting = ":cpu",
-)
-
-constraint_value(
- name = "s390x",
- constraint_setting = ":cpu",
-)
-
-# These match values in //src/main/java/com/google/build/lib/util:OS.java
-constraint_setting(name = "os")
-
-constraint_value(
- name = "osx",
- constraint_setting = ":os",
-)
-
-constraint_value(
- name = "freebsd",
- constraint_setting = ":os",
-)
-
-constraint_value(
- name = "linux",
- constraint_setting = ":os",
-)
-
-constraint_value(
- name = "windows",
- constraint_setting = ":os",
-)
-
-# A default platform with nothing defined.
-platform(name = "default_platform")
-
-# A default platform referring to the host system. This only exists for
-# internal build configurations, and so shouldn't be accessed by other packages.
-platform(
- name = "host_platform",
- cpu_constraints = [
- ":x86_32",
- ":x86_64",
- ":ppc",
- ":arm",
- ":s390x",
- ],
- host_platform = True,
- os_constraints = [
- ":osx",
- ":freebsd",
- ":linux",
- ":windows",
- ],
-)
-
-platform(
- name = "target_platform",
- cpu_constraints = [
- ":x86_32",
- ":x86_64",
- ":ppc",
- ":arm",
- ":s390x",
- ],
- os_constraints = [
- ":osx",
- ":freebsd",
- ":linux",
- ":windows",
- ],
- target_platform = True,
-)