aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/def_file_filter
diff options
context:
space:
mode:
authorGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-10 12:42:42 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-10 12:42:47 -0700
commit620411385f7b444c9177582c5e190288b6aad6a7 (patch)
tree372b309f5c2989d10f9fde4ee24072d29af2c717 /tensorflow/tools/def_file_filter
parent501bb0d18c1891baa1b1904b281994323c52aa15 (diff)
parentee50389b259c24ca84a7149d06e9cfea3b30e55d (diff)
Merge pull request #21539 from tensorflow:meteorcloudy-patch-1
PiperOrigin-RevId: 208251834
Diffstat (limited to 'tensorflow/tools/def_file_filter')
-rw-r--r--tensorflow/tools/def_file_filter/def_file_filter_configure.bzl42
1 files changed, 21 insertions, 21 deletions
diff --git a/tensorflow/tools/def_file_filter/def_file_filter_configure.bzl b/tensorflow/tools/def_file_filter/def_file_filter_configure.bzl
index f8f63e276c..df0fd05319 100644
--- a/tensorflow/tools/def_file_filter/def_file_filter_configure.bzl
+++ b/tensorflow/tools/def_file_filter/def_file_filter_configure.bzl
@@ -24,27 +24,27 @@ load("@bazel_tools//tools/cpp:windows_cc_configure.bzl", "find_msvc_tool")
load("@bazel_tools//tools/cpp:lib_cc_configure.bzl", "auto_configure_fail")
def _def_file_filter_configure_impl(repository_ctx):
- if repository_ctx.os.name.lower().find("windows") == -1:
+ if repository_ctx.os.name.lower().find("windows") == -1:
+ repository_ctx.symlink(Label("//tensorflow/tools/def_file_filter:BUILD.tpl"), "BUILD")
+ repository_ctx.file("def_file_filter.py", "")
+ return
+ vc_path = find_vc_path(repository_ctx)
+ if vc_path == None:
+ auto_configure_fail("Visual C++ build tools not found on your machine")
+
+ undname = find_msvc_tool(repository_ctx, vc_path, "undname.exe")
+ if undname == None:
+ auto_configure_fail("Couldn't find undname.exe under %s, please check your VC installation and set BAZEL_VC environment variable correctly." % vc_path)
+ undname_bin_path = undname.replace("\\", "\\\\")
+
+ repository_ctx.template(
+ "def_file_filter.py",
+ Label("//tensorflow/tools/def_file_filter:def_file_filter.py.tpl"),
+ {
+ "%{undname_bin_path}": undname_bin_path,
+ },
+ )
repository_ctx.symlink(Label("//tensorflow/tools/def_file_filter:BUILD.tpl"), "BUILD")
- repository_ctx.file("def_file_filter.py", "")
- return
- vc_path = find_vc_path(repository_ctx)
- if vc_path == "visual-studio-not-found":
- auto_configure_fail("Visual C++ build tools not found on your machine")
-
- undname = find_msvc_tool(repository_ctx, vc_path, "undname.exe")
- if undname == None:
- auto_configure_fail("Couldn't find undname.exe under %s, please check your VC installation and set BAZEL_VC environment variable correctly." % vc_path)
- undname_bin_path = undname.replace("\\", "\\\\")
-
- repository_ctx.template(
- "def_file_filter.py",
- Label("//tensorflow/tools/def_file_filter:def_file_filter.py.tpl"),
- {
- "%{undname_bin_path}": undname_bin_path,
- })
- repository_ctx.symlink(Label("//tensorflow/tools/def_file_filter:BUILD.tpl"), "BUILD")
-
def_file_filter_configure = repository_rule(
implementation = _def_file_filter_configure_impl,
@@ -55,6 +55,6 @@ def_file_filter_configure = repository_rule(
"VS100COMNTOOLS",
"VS110COMNTOOLS",
"VS120COMNTOOLS",
- "VS140COMNTOOLS"
+ "VS140COMNTOOLS",
],
)