Skip to content

Commit

Permalink
Use llvm-nm instead of cctools nm
Browse files Browse the repository at this point in the history
Since Xcode 7, Xcode has been using llvm-nm to provide the nm tool.
  • Loading branch information
mstorsjo committed Oct 23, 2019
1 parent 8c31370 commit ebb8014
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN set -x \
&& mv clang+llvm-5.0.0-linux-x86_64-ubuntu16.04 clang \
&& cd clang \
&& mkdir bin-new \
&& mv bin/clang-5.0 bin/clang bin/clang++ bin/llvm-dsymutil bin-new \
&& mv bin/clang-5.0 bin/clang bin/clang++ bin/llvm-dsymutil bin/llvm-nm bin-new \
&& rm -rf bin \
&& mv bin-new bin \
&& rm -rf lib/*.a lib/*.so lib/*.so.* lib/clang/5.0.0/lib/linux
Expand Down
4 changes: 2 additions & 2 deletions setup-symlinks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ CCTOOLS="$3"

ARCHS="i386 x86_64 armv7 arm64"
mkdir -p $PREFIX/bin
for tool in clang clang++ cc gcc c++ g++; do
for tool in clang clang++ cc gcc c++ g++ nm; do
for arch in $ARCHS; do
ln -sf $DEVELOPER_DIR/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/$tool $PREFIX/bin/$arch-apple-darwin-$tool
done
ln -sf $DEVELOPER_DIR/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/$tool $PREFIX/bin/apple-darwin-$tool
done
for tool in ar as ld nm ranlib strings strip; do
for tool in ar as ld ranlib strings strip; do
for arch in $ARCHS; do
ln -sf $CCTOOLS/bin/$tool $PREFIX/bin/$arch-apple-darwin-$tool
done
Expand Down
1 change: 1 addition & 0 deletions setup-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ ln -sf clang gcc
ln -sf clang g++

ln -s $CLANG/bin/llvm-dsymutil dsymutil
ln -s $CLANG/bin/llvm-nm nm

cd ../lib
mkdir -p $CLANG/lib/arc
Expand Down

0 comments on commit ebb8014

Please sign in to comment.