Skip to content

Commit 225301e

Browse files
committed
Pass "\$ORIGIN" to ROCm crosstool to preserve "$ORIGIN" at link time
This commit removes LD_LIBRARY_PATH env var previously required on ROCm platform. Further commit need to improve logic here so it's only applied when TensorFlow is configured to be built on ROCm platform. Right now the commit applies to all environments.
1 parent aea1eea commit 225301e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
# press enter all the way
1010
#
1111
pip3 uninstall -y tensorflow || true
12-
LD_LIBRARY_PATH=~/.cache/bazel/_bazel_root/efb88f6336d9c4a18216fb94287b8d97/execroot/org_tensorflow/bazel-out/host/bin/tensorflow bazel build --config=opt --config=rocm //tensorflow/tools/pip_package:build_pip_package --verbose_failures &&
12+
bazel build --config=opt --config=rocm //tensorflow/tools/pip_package:build_pip_package --verbose_failures &&
1313
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg &&
1414
pip3 install /tmp/tensorflow_pkg/tensorflow-1.8.0rc1-cp35-cp35m-linux_x86_64.whl

tensorflow/tensorflow.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def _rpath_linkopts(name):
284284
clean_dep("//tensorflow:windows"): [],
285285
clean_dep("//tensorflow:windows_msvc"): [],
286286
"//conditions:default": [
287-
"-Wl,%s" % (_make_search_paths("$$ORIGIN", levels_to_root),),
287+
"-Wl,%s" % (_make_search_paths("\\\$$ORIGIN", levels_to_root),),
288288
],
289289
})
290290

0 commit comments

Comments
 (0)