diff options
Diffstat (limited to 'tensorflow/compiler/xla/xla.bzl')
-rw-r--r-- | tensorflow/compiler/xla/xla.bzl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/xla.bzl b/tensorflow/compiler/xla/xla.bzl new file mode 100644 index 0000000000..bdd3dfe82d --- /dev/null +++ b/tensorflow/compiler/xla/xla.bzl @@ -0,0 +1,22 @@ +"""Wrapper around cc_proto_library used inside the XLA codebase.""" + +load("@protobuf//:protobuf.bzl", "cc_proto_library") + +# xla_proto_library() is a convenience wrapper around cc_proto_library. +def xla_proto_library(name, srcs=[], deps=[], visibility=None, testonly=0): + cc_proto_library(name=name, + srcs=srcs, + deps=deps, + cc_libs = ["@protobuf//:protobuf"], + protoc="@protobuf//:protoc", + default_runtime="@protobuf//:protobuf", + testonly=testonly, + visibility=visibility,) + +# Flags required for modules that export symbols that are to be called by the +# XLA CustomCall operator. CustomCall must be able to find symbols with dlsym(), +# which on Linux requires we link with --export-dynamic. +export_dynamic_linkopts = select({ + "//tensorflow:darwin": [], + "//conditions:default": ["-Wl,--export-dynamic"], +}) |