diff options
author | Brennan Saeta <brennan.saeta@gmail.com> | 2018-06-16 12:23:23 -0700 |
---|---|---|
committer | Gunhan Gulsoy <gunan@google.com> | 2018-06-16 12:23:23 -0700 |
commit | 6d1603622b1c3b25de0a8d342714fed271308a47 (patch) | |
tree | b6f141e7cdd24c90ad7ca537ad0ecd690d8b36e1 /tensorflow/BUILD | |
parent | 79d7e11f3ea4ec13332693cdcf271bf10aad583d (diff) |
Do not depend on boringssl for big-endian architectures. (#20038)
* Do not depend on boringssl for big-endian architectures.
A recent commit migrated TensorFlow from grpc_unsecure (and grpc++_unsecure)
to their secure variants. These secure variants depend on BoringSSL.
Unfortunately, BoringSSL does not work on big-endian architectures.
This commit abstracts the grpc dependency behind a couple cc_library rules,
and plumbs through the logic to conditionally build without BoringSSL based
on the target architecture.
Fixes #20014
* Fix BUILD file formatting.
* Fix typo in CPU name
* Add an additional bind and select when evaluating the cc_proto_library rules.
Diffstat (limited to 'tensorflow/BUILD')
-rw-r--r-- | tensorflow/BUILD | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tensorflow/BUILD b/tensorflow/BUILD index d77f04139e..4e212e96dc 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD @@ -155,6 +155,12 @@ config_setting( ) config_setting( + name = "linux_s390x", + values = {"cpu": "s390x"}, + visibility = ["//visibility:public"], +) + +config_setting( name = "debug", values = { "compilation_mode": "dbg", @@ -424,6 +430,22 @@ filegroup( data = glob(["docs_src/**/*.md"]), ) +cc_library( + name = "grpc", + deps = select({ + ":linux_s390x": ["@grpc//:grpc_unsecure"], + "//conditions:default": ["@grpc"], + }), +) + +cc_library( + name = "grpc++", + deps = select({ + ":linux_s390x": ["@grpc//:grpc++_unsecure"], + "//conditions:default": ["@grpc//:grpc++"], + }), +) + # A shared object which includes registration mechanisms for ops and # kernels. Does not include the implementations of any ops or kernels. Instead, # the library which loads libtensorflow_framework.so |