From cff4fc643e3c75f9cba838cc5afc7d6ad8769e11 Mon Sep 17 00:00:00 2001 From: Jason Zaman Date: Wed, 25 Mar 2020 13:46:53 +0800 Subject: [PATCH 1/3] systemlibs: Add stub bazel/grpc_deps.bzl to grpc dep --- tensorflow/workspace.bzl | 5 +++++ third_party/systemlibs/grpc.bazel.grpc_deps.bzl | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 third_party/systemlibs/grpc.bazel.grpc_deps.bzl diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index ead41e83c37..38b600624ee 100755 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -562,6 +562,11 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): sha256 = "b956598d8cbe168b5ee717b5dafa56563eb5201a947856a6688bbeac9cac4e1f", strip_prefix = "grpc-b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd", system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"), + system_link_files = { + "//third_party/systemlibs:BUILD": "bazel/BUILD", + "//third_party/systemlibs:grpc.BUILD": "src/compiler/BUILD", + "//third_party/systemlibs:grpc.bazel.grpc_deps.bzl": "bazel/grpc_deps.bzl", + }, urls = [ "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd.tar.gz", "https://github.com/grpc/grpc/archive/b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd.tar.gz", diff --git a/third_party/systemlibs/grpc.bazel.grpc_deps.bzl b/third_party/systemlibs/grpc.bazel.grpc_deps.bzl new file mode 100644 index 00000000000..97f7db0a377 --- /dev/null +++ b/third_party/systemlibs/grpc.bazel.grpc_deps.bzl @@ -0,0 +1,7 @@ +"""Load dependencies needed to compile and test the grpc library as a 3rd-party consumer.""" + +def grpc_deps(): + """Loads dependencies need to compile and test the grpc library.""" + + pass + From c85b5d0c17ae69b90d1ef8766489a7b3da1db5cd Mon Sep 17 00:00:00 2001 From: Jason Zaman Date: Fri, 27 Mar 2020 09:43:57 +0800 Subject: [PATCH 2/3] systemlibs: unbundle astunparse Signed-off-by: Jason Zaman --- third_party/systemlibs/astunparse.BUILD | 15 +++++++++++++++ third_party/systemlibs/syslibs_configure.bzl | 1 + 2 files changed, 16 insertions(+) create mode 100644 third_party/systemlibs/astunparse.BUILD diff --git a/third_party/systemlibs/astunparse.BUILD b/third_party/systemlibs/astunparse.BUILD new file mode 100644 index 00000000000..af0bd2ca72c --- /dev/null +++ b/third_party/systemlibs/astunparse.BUILD @@ -0,0 +1,15 @@ +# Description: +# AST round-trip manipulation for Python. + +licenses(["notice"]) + +py_library( + name = "astunparse", + visibility = ["//visibility:public"], +) + +filegroup( + name = "LICENSE", + visibility = ["//visibility:public"], +) + diff --git a/third_party/systemlibs/syslibs_configure.bzl b/third_party/systemlibs/syslibs_configure.bzl index 7a96fdf9d21..42c6ba73002 100644 --- a/third_party/systemlibs/syslibs_configure.bzl +++ b/third_party/systemlibs/syslibs_configure.bzl @@ -11,6 +11,7 @@ _TF_SYSTEM_LIBS = "TF_SYSTEM_LIBS" VALID_LIBS = [ "absl_py", "astor_archive", + "astunparse_archive", "boringssl", "com_github_googleapis_googleapis", "com_github_googlecloudplatform_google_cloud_cpp", From 9cee90ac957f2575da2415242c5c127c0dd61430 Mon Sep 17 00:00:00 2001 From: Jason Zaman Date: Wed, 8 Apr 2020 03:15:14 +0800 Subject: [PATCH 3/3] systemlibs: protobuf: update for --incompatible_no_support_tools_in_action_inputs Just the minimal changes needed to work with the change instead of pulling the entire updated file which would be a much larger change Signed-off-by: Jason Zaman --- third_party/systemlibs/protobuf.bzl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/third_party/systemlibs/protobuf.bzl b/third_party/systemlibs/protobuf.bzl index bb807e904a3..367ac286395 100644 --- a/third_party/systemlibs/protobuf.bzl +++ b/third_party/systemlibs/protobuf.bzl @@ -93,6 +93,7 @@ def _proto_gen_impl(ctx): args += ["--python_out=" + gen_dir] inputs = srcs + deps + tools = [ctx.executable.protoc] if ctx.executable.plugin: plugin = ctx.executable.plugin lang = ctx.attr.plugin_language @@ -106,7 +107,7 @@ def _proto_gen_impl(ctx): outdir = ",".join(ctx.attr.plugin_options) + ":" + outdir args += ["--plugin=protoc-gen-%s=%s" % (lang, plugin.path)] args += ["--%s_out=%s" % (lang, outdir)] - inputs += [plugin] + tools.append(plugin) if args: ctx.actions.run( @@ -115,6 +116,7 @@ def _proto_gen_impl(ctx): arguments = args + import_flags + [s.path for s in srcs], executable = ctx.executable.protoc, mnemonic = "ProtoCompile", + tools = tools, use_default_shell_env = True, )