diff options
-rw-r--r-- | WORKSPACE | 32 | ||||
-rw-r--r-- | tensorflow/workspace.bzl | 38 |
2 files changed, 37 insertions, 33 deletions
@@ -12,40 +12,10 @@ # path="<PATH_TO_NDK>", # api_level=21) +# Please add all new TensorFlow dependencies in workspace.bzl. load("//tensorflow:workspace.bzl", "tf_workspace") tf_workspace() -# grpc expects //external:protobuf_clib and //external:protobuf_compiler -# to point to the protobuf's compiler library. -bind( - name = "protobuf_clib", - actual = "//google/protobuf:protoc_lib", -) - -bind( - name = "protobuf_compiler", - actual = "//google/protobuf:protoc_lib", -) - -git_repository( - name = "grpc", - commit = "73979f4", - init_submodules = True, - remote = "https://github.com/grpc/grpc.git", -) - -# protobuf expects //external:grpc_cpp_plugin to point to grpc's -# C++ plugin code generator. -bind( - name = "grpc_cpp_plugin", - actual = "@grpc//:grpc_cpp_plugin", -) - -bind( - name = "grpc_lib", - actual = "@grpc//:grpc++_unsecure", -) - # TENSORBOARD_BOWER_AUTOGENERATED_BELOW_THIS_LINE_DO_NOT_EDIT new_git_repository( diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index 953cedf2c5..f0d0702a48 100644 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -1,6 +1,9 @@ -# Tensorflow external dependencies that can be loaded in WORKSPACE files. +# TensorFlow external dependencies that can be loaded in WORKSPACE files. -def tf_workspace(path_prefix = ""): +# If TensorFlow is linked as a submodule, path_prefix is TensorFlow's directory +# within the workspace (e.g. "tensorflow/"), and tf_repo_name is the name of the +# local_repository rule (e.g. "@tf"). +def tf_workspace(path_prefix = "", tf_repo_name = ""): native.new_http_archive( name = "gmock_archive", url = "https://googlemock.googlecode.com/files/gmock-1.7.0.zip", @@ -56,3 +59,34 @@ def tf_workspace(path_prefix = ""): name = "six", actual = "@six_archive//:six", ) + + # grpc expects //external:protobuf_clib and //external:protobuf_compiler + # to point to the protobuf's compiler library. + native.bind( + name = "protobuf_clib", + actual = tf_repo_name + "//google/protobuf:protoc_lib", + ) + + native.bind( + name = "protobuf_compiler", + actual = tf_repo_name + "//google/protobuf:protoc_lib", + ) + + native.git_repository( + name = "grpc", + commit = "73979f4", + init_submodules = True, + remote = "https://github.com/grpc/grpc.git", + ) + + # protobuf expects //external:grpc_cpp_plugin to point to grpc's + # C++ plugin code generator. + native.bind( + name = "grpc_cpp_plugin", + actual = "@grpc//:grpc_cpp_plugin", + ) + + native.bind( + name = "grpc_lib", + actual = "@grpc//:grpc++_unsecure", + ) |