Skip to content

Commit

Permalink
Fix lld on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Apr 14, 2022
1 parent 4d471b6 commit 2425c36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ build() {
cd out
cp -af ../rust/build/$TRIPLE/llvm/bin llvm-bin
cp -af ../rust/build/$TRIPLE/llvm/lib/clang/$RUST_CLANG/include clang-include
ln -s ../lib/rustlib/$TRIPLE/bin/rust-lld llvm-bin/lld
cp -af lib/rustlib/$TRIPLE/bin/rust-lld llvm-bin/lld
ln -s lld llvm-bin/ld
find ../rust/build/$TRIPLE/llvm/lib -name "*.${DYN_EXT}*" -exec cp -an {} lib \;
cd ..
Expand Down Expand Up @@ -93,12 +93,6 @@ universal() {
cp -af out.x86 out
cp -an out.arm/. out/. || true

# Replace lld link with universal binary
rm out/llvm-bin/lld
lipo -create -output out/llvm-bin/lld \
out/lib/rustlib/x86_64-apple-darwin/bin/rust-lld \
out/lib/rustlib/aarch64-apple-darwin/bin/rust-lld

# Merge all Mach-O files as universal binary and adhoc codesign
find out -type f -exec sh -c "file {} | grep -q Mach-O" \; -print0 | \
while IFS= read -r -d '' o; do
Expand Down
2 changes: 1 addition & 1 deletion common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RUST_VERSION='beta'
NDK_VERSION='r24'
OUTPUT_VERSION='r24.0'
OUTPUT_VERSION='r24.1'

RUST_CLANG='14.0.0'
NDK_CLANG='14.0.1'
Expand Down

0 comments on commit 2425c36

Please sign in to comment.