aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tensorflow.bzl
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-12-04 01:32:12 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-12-04 01:35:43 -0800
commitc02cfb040d2609d605b909b81f4419e948e1560d (patch)
treeab4daa1f12b4ce70b7b12bceee8a50efb39f0312 /tensorflow/tensorflow.bzl
parent88e63eb7099e2cd82e942f4b3867a9fedffb3d85 (diff)
Add an argument for additional linkopts for py_wrappers rule.
PiperOrigin-RevId: 177784085
Diffstat (limited to 'tensorflow/tensorflow.bzl')
-rw-r--r--tensorflow/tensorflow.bzl7
1 files changed, 5 insertions, 2 deletions
diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl
index 0015eb0094..d194b37700 100644
--- a/tensorflow/tensorflow.bzl
+++ b/tensorflow/tensorflow.bzl
@@ -458,6 +458,8 @@ def tf_gen_op_wrappers_cc(name,
# "name" arg)
# op_whitelist: if not empty, only op names in this list will be wrapped. It
# is invalid to specify both "hidden" and "op_whitelist".
+# cc_linkopts: Optional linkopts to be added to tf_cc_binary that contains the
+# specified ops.
def tf_gen_op_wrapper_py(name,
out=None,
hidden=None,
@@ -466,7 +468,8 @@ def tf_gen_op_wrapper_py(name,
require_shape_functions=False,
hidden_file=None,
generated_target_name=None,
- op_whitelist=[]):
+ op_whitelist=[],
+ cc_linkopts=[]):
if (hidden or hidden_file) and op_whitelist:
fail('Cannot pass specify both hidden and op_whitelist.')
@@ -476,7 +479,7 @@ def tf_gen_op_wrapper_py(name,
deps = [str(Label("//tensorflow/core:" + name + "_op_lib"))]
tf_cc_binary(
name=tool_name,
- linkopts=["-lm"],
+ linkopts=["-lm"] + cc_linkopts,
copts=tf_copts(),
linkstatic=1, # Faster to link this one-time-use binary dynamically
deps=([