Skip to content

Commit

Permalink
admin/build-doc: drop --no-as-needed on Darwin
Browse files Browse the repository at this point in the history
which is not supported by ld on OSX.

also, pass the rpath argument as a new command line argument instead
using -rpath=foo, which is not supported by llvm linker.

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Mar 15, 2020
1 parent e88f8ee commit ea67a42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion admin/build-doc
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ for bind in rados rbd cephfs rgw; do
fi
ln -sf lib${bind}.so.1 $vdir/lib/lib${bind}.so
gcc -shared -o $vdir/lib/lib${bind}.so.1 -xc /dev/null
ld_flags="-Wl,-rpath,$vdir/lib"
if [ $(uname) != Darwin ]; then
ld_flags="${ld_flags},--no-as-needed"
fi
BUILD_DOC=1 \
CFLAGS="-iquote$TOPDIR/src/include" \
CPPFLAGS="-iquote$TOPDIR/src/include" \
LDFLAGS="-L$vdir/lib -Wl,--no-as-needed,-rpath=$vdir/lib" \
LDFLAGS="-L$vdir/lib ${ld_flags}" \
$vdir/bin/pip install --upgrade $TOPDIR/src/pybind/${bind}
# rgwfile_version(), librgw_create(), rgw_mount()
# since py3.5, distutils adds postfix in between ${bind} and so
Expand Down

0 comments on commit ea67a42

Please sign in to comment.