aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/def_parser
diff options
context:
space:
mode:
Diffstat (limited to 'tools/def_parser')
-rw-r--r--tools/def_parser/BUILD18
-rw-r--r--tools/def_parser/BUILD.tools13
-rw-r--r--tools/def_parser/no_op.bat17
3 files changed, 48 insertions, 0 deletions
diff --git a/tools/def_parser/BUILD b/tools/def_parser/BUILD
new file mode 100644
index 0000000000..7070bebf00
--- /dev/null
+++ b/tools/def_parser/BUILD
@@ -0,0 +1,18 @@
+package(default_visibility = ["//visibility:public"])
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+)
+
+# cc_toolchain now implicitly depends on @bazel_tools//tools/def_parser:def_parser
+# We need to make sure @bazel_tools//tools/def_parser:def_parser is not
+# a cc_binary, because otherwise, we'll introduce a cycle in dependency graph:
+# .-> @bazel_tools//tools/def_parser:def_parser (cc_binary)
+# | cc_toolchain
+# `-- @bazel_tools//tools/def_parser:def_parser (cc_binary)
+
+filegroup(
+ name = "def_parser",
+ srcs = ["no_op.bat"],
+)
diff --git a/tools/def_parser/BUILD.tools b/tools/def_parser/BUILD.tools
new file mode 100644
index 0000000000..bd1b891fa8
--- /dev/null
+++ b/tools/def_parser/BUILD.tools
@@ -0,0 +1,13 @@
+package(default_visibility = ["//visibility:public"])
+
+filegroup(
+ name = "def_parser",
+ srcs = select({
+ "//src:host_windows": ["def_parser.exe"],
+ "//src:host_windows_msvc": ["def_parser.exe"],
+ "//src:host_windows_msys": ["def_parser.exe"],
+ "//conditions:default": [
+ "no_op.bat",
+ ],
+ }),
+)
diff --git a/tools/def_parser/no_op.bat b/tools/def_parser/no_op.bat
new file mode 100644
index 0000000000..b422585831
--- /dev/null
+++ b/tools/def_parser/no_op.bat
@@ -0,0 +1,17 @@
+:: Copyright 2016 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.
+
+:: Invoke the python script under pydir with the same basename
+@echo OFF
+echo IGNORING: %0 %*