diff options
author | 2017-12-04 01:32:12 -0800 | |
---|---|---|
committer | 2017-12-04 01:35:43 -0800 | |
commit | c02cfb040d2609d605b909b81f4419e948e1560d (patch) | |
tree | ab4daa1f12b4ce70b7b12bceee8a50efb39f0312 /tensorflow/tensorflow.bzl | |
parent | 88e63eb7099e2cd82e942f4b3867a9fedffb3d85 (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.bzl | 7 |
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=([ |