From 6d1603622b1c3b25de0a8d342714fed271308a47 Mon Sep 17 00:00:00 2001 From: Brennan Saeta Date: Sat, 16 Jun 2018 12:23:23 -0700 Subject: 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. --- tensorflow/BUILD | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tensorflow/BUILD') diff --git a/tensorflow/BUILD b/tensorflow/BUILD index d77f04139e..4e212e96dc 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD @@ -154,6 +154,12 @@ config_setting( visibility = ["//visibility:public"], ) +config_setting( + name = "linux_s390x", + values = {"cpu": "s390x"}, + visibility = ["//visibility:public"], +) + config_setting( name = "debug", values = { @@ -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 -- cgit v1.2.3