Add additional linkopts argument to tf_custom_op_library.

PiperOrigin-RevId: 177555877
This commit is contained in:
A. Unique TensorFlower 2017-11-30 23:20:35 -08:00 committed by TensorFlower Gardener
parent 6eec9c2ea3
commit e747fc911f

View File

@ -1197,7 +1197,7 @@ check_deps = rule(
# Helper to build a dynamic library (.so) from the sources containing
# implementations of custom ops and kernels.
def tf_custom_op_library(name, srcs=[], gpu_srcs=[], deps=[]):
def tf_custom_op_library(name, srcs=[], gpu_srcs=[], deps=[], linkopts=[]):
cuda_deps = [
clean_dep("//tensorflow/core:stream_executor_headers_lib"),
"@local_config_cuda//cuda:cuda_headers",
@ -1226,7 +1226,7 @@ def tf_custom_op_library(name, srcs=[], gpu_srcs=[], deps=[]):
deps=deps + if_cuda(cuda_deps),
data=[name + "_check_deps"],
copts=tf_copts(),
linkopts=select({
linkopts=linkopts + select({
"//conditions:default": [
"-lm",
],