diff options
Diffstat (limited to 'tensorflow/tensorflow.bzl')
-rw-r--r-- | tensorflow/tensorflow.bzl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl index c7766f384e..741145216c 100644 --- a/tensorflow/tensorflow.bzl +++ b/tensorflow/tensorflow.bzl @@ -438,7 +438,7 @@ def tf_gen_op_wrapper_cc( tf_cc_binary( name = tool, copts = tf_copts(), - linkopts = if_not_windows(["-lm"]), + linkopts = if_not_windows(["-lm","-Wl,-ldl"]), linkstatic = 1, # Faster to link this one-time-use binary dynamically deps = [op_gen] + deps, ) @@ -592,6 +592,7 @@ def tf_gen_op_wrappers_cc( # 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, @@ -613,7 +614,7 @@ def tf_gen_op_wrapper_py( deps = [str(Label("//tensorflow/core:" + name + "_op_lib"))] tf_cc_binary( name = tool_name, - linkopts = if_not_windows(["-lm"]) + cc_linkopts, + linkopts = if_not_windows(["-lm","-Wl,-ldl"]) + cc_linkopts, copts = tf_copts(), linkstatic = 1, # Faster to link this one-time-use binary dynamically deps = ([ |