Skip to content

Commit 59a4ef4

Browse files
authored
Merge pull request #86 from mwootton/rocm_linking
ROCM: Escape RPATH when linking with hipcc
2 parents 99dda1e + 3a9dc0f commit 59a4ef4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/build_pytorch_libs.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ if [[ $(uname) == 'Darwin' ]]; then
9797
LDFLAGS="$LDFLAGS -Wl,-rpath,@loader_path"
9898
LD_POSTFIX=".dylib"
9999
else
100-
LDFLAGS="$LDFLAGS -Wl,-rpath,\$ORIGIN"
100+
if [[ $USE_ROCM -eq 1 ]]; then
101+
LDFLAGS="$LDFLAGS -Wl,-rpath,\\\\\\\$ORIGIN"
102+
else
103+
LDFLAGS="$LDFLAGS -Wl,-rpath,\$ORIGIN"
104+
fi
101105
fi
102106
CPP_FLAGS=" -std=c++11 "
103107
GLOO_FLAGS=""

0 commit comments

Comments
 (0)