Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mkl]Fix gcc6.3 build link issue #21149

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions tensorflow/tensorflow.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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,
Expand All @@ -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 = ([
Expand Down