aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tensorflow.bzl
diff options
context:
space:
mode:
authorGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-16 19:48:55 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-16 19:48:55 -0700
commitc06cd5710ce42e1e0b0a8bd5eebca3d5f816330e (patch)
tree705f8b0a1b156b05b00ef52820bf2c4d2dbb0531 /tensorflow/tensorflow.bzl
parenta6ee64cd216b3ac440262e1f4ec7872fe7026df6 (diff)
parentc74bfd040c7212a3016a546cd140d5be18d7b347 (diff)
Merge pull request #21149 from Intel-tensorflow:shaohua/fix_gcc6.3_build_link_issue
PiperOrigin-RevId: 213208519
Diffstat (limited to 'tensorflow/tensorflow.bzl')
-rw-r--r--tensorflow/tensorflow.bzl5
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl
index adac895a17..16f7b217b4 100644
--- a/tensorflow/tensorflow.bzl
+++ b/tensorflow/tensorflow.bzl
@@ -448,7 +448,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,
)
@@ -602,6 +602,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,
@@ -623,7 +624,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 = ([