1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
--- tensorflow/tensorflow.bzl.orig 2019-06-18 23:48:23.000000000 +0100
+++ tensorflow/tensorflow.bzl 2019-07-13 13:57:17.579194000 +0100
@@ -287,6 +287,7 @@
"-Wno-sign-compare",
"-fno-exceptions",
"-ftemplate-depth=900",
+ "-I%%LOCALBASE%%/include",
]) +
if_cuda(["-DGOOGLE_CUDA=1"]) +
if_tensorrt(["-DGOOGLE_TENSORRT=1"]) +
@@ -603,7 +604,7 @@
],
),
data = depset(data + added_data_deps),
- linkopts = linkopts + _rpath_linkopts(name_os),
+ linkopts = linkopts + ["-lexecinfo", "-lgpr"] + _rpath_linkopts(name),
visibility = visibility,
**kwargs
)
@@ -657,7 +658,7 @@
tf_cc_binary(
name = tool,
copts = tf_copts(),
- linkopts = if_not_windows(["-lm", "-Wl,-ldl"]),
+ linkopts = if_not_windows(["-lm", "-Wl, -lexecinfo"]),
linkstatic = 1, # Faster to link this one-time-use binary dynamically
deps = [op_gen] + deps,
)
@@ -839,7 +840,7 @@
tf_cc_binary(
name = tool_name,
copts = tf_copts(),
- linkopts = if_not_windows(["-lm", "-Wl,-ldl"]) + cc_linkopts,
+ linkopts = if_not_windows(["-L%%LOCALBASE%%/lib", "-lm", "-Wl, -lexecinfo"]) + cc_linkopts,
linkstatic = 1, # Faster to link this one-time-use binary dynamically
visibility = [clean_dep("//tensorflow:internal")],
deps = ([
@@ -954,8 +955,9 @@
"//conditions:default": [
"-lpthread",
"-lm",
+ "-lexecinfo",
],
- }) + linkopts + _rpath_linkopts(name),
+ }) + linkopts + ["-lexecinfo"] + _rpath_linkopts(name),
deps = deps + tf_binary_dynamic_kernel_deps(kernels) + if_mkl_ml(
[
clean_dep("//third_party/mkl:intel_binary_blob"),
@@ -1103,7 +1105,7 @@
]) + if_rocm_is_configured([
clean_dep("//tensorflow/core:gpu_lib"),
]),
- linkopts = if_not_windows(["-lpthread", "-lm"]) + linkopts + _rpath_linkopts(name),
+ linkopts = if_not_windows(["-lpthread", "-lm", "-lexecinfo",]) + linkopts + _rpath_linkopts(name),
linkstatic = linkstatic or select({
# cc_tests with ".so"s in srcs incorrectly link on Darwin
# unless linkstatic=1.
@@ -1784,6 +1786,7 @@
linkopts = linkopts + select({
"//conditions:default": [
"-lm",
+ "-lexecinfo",
],
clean_dep("//tensorflow:windows"): [],
clean_dep("//tensorflow:macos"): [],
|