Use llvm-ar with the flag 'L' instead of a helper MRI script for merging archives
This commit is contained in:
1 parent
52fc6c5c06
commit
585c767ee4
4 files changed
+5
-42
No files matched your search
+1
-1
@@ -37,7 +37,7 @@ RUN ./build-mingw-w64.sh $TOOLCHAIN_PREFIX && \
|
||||
rm -rf /build/*
|
||||
|
||||
# Build libunwind/libcxxabi/libcxx
|
||||
COPY build-libcxx.sh merge-archives.sh ./
|
||||
COPY build-libcxx.sh ./
|
||||
RUN ./build-libcxx.sh $TOOLCHAIN_PREFIX && \
|
||||
rm -rf /build/*
|
||||
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ RUN cd test && \
|
||||
done
|
||||
|
||||
# Build libunwind/libcxxabi/libcxx
|
||||
COPY build-libcxx.sh merge-archives.sh ./
|
||||
COPY build-libcxx.sh ./
|
||||
RUN ./build-libcxx.sh $TOOLCHAIN_PREFIX
|
||||
|
||||
# Build C++ test applications
|
||||
|
||||
+3
-4
@@ -66,7 +66,6 @@ if [ -n "$SYNC" ] || [ -n "$CHECKOUT_LIBCXX" ]; then
|
||||
fi
|
||||
|
||||
LIBCXX=$(pwd)/libcxx
|
||||
MERGE_ARCHIVES=$(pwd)/merge-archives.sh
|
||||
|
||||
case $(uname) in
|
||||
MINGW*)
|
||||
@@ -125,7 +124,7 @@ build_all() {
|
||||
else
|
||||
# Merge libpsapi.a into the static library libunwind.a, to
|
||||
# avoid having to specify -lpsapi when linking to it.
|
||||
$MERGE_ARCHIVES \
|
||||
llvm-ar qcsL \
|
||||
$PREFIX/$arch-w64-mingw32/lib/libunwind.a \
|
||||
$PREFIX/$arch-w64-mingw32/lib/libpsapi.a
|
||||
fi
|
||||
@@ -219,12 +218,12 @@ build_all() {
|
||||
make -j$CORES
|
||||
make install
|
||||
if [ "$type" = "shared" ]; then
|
||||
$MERGE_ARCHIVES \
|
||||
llvm-ar qcsL \
|
||||
$PREFIX/$arch-w64-mingw32/lib/libc++.dll.a \
|
||||
$PREFIX/$arch-w64-mingw32/lib/libunwind.dll.a
|
||||
cp lib/libc++.dll $PREFIX/$arch-w64-mingw32/bin
|
||||
else
|
||||
$MERGE_ARCHIVES \
|
||||
llvm-ar qcsL \
|
||||
$PREFIX/$arch-w64-mingw32/lib/libc++.a \
|
||||
$PREFIX/$arch-w64-mingw32/lib/libunwind.a
|
||||
fi
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo $0 lib add1 [add2...]
|
||||
exit 1
|
||||
fi
|
||||
|
||||
: ${AR:=llvm-ar}
|
||||
: ${RANLIB:=llvm-ranlib}
|
||||
|
||||
SCRIPT=merge.mri
|
||||
OUT=tmp.a
|
||||
TARGET=$1
|
||||
|
||||
rm -f $SCRIPT
|
||||
|
||||
echo "CREATE $OUT" >> $SCRIPT
|
||||
while [ $# -gt 0 ]; do
|
||||
case $(uname) in
|
||||
MINGW*)
|
||||
echo "ADDLIB $(cygpath -w $1)" >> $SCRIPT
|
||||
;;
|
||||
*)
|
||||
echo "ADDLIB $1" >> $SCRIPT
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
echo "SAVE" >> $SCRIPT
|
||||
echo "END" >> $SCRIPT
|
||||
$AR -M < $SCRIPT
|
||||
rm -f $SCRIPT
|
||||
$RANLIB $OUT
|
||||
mv $OUT $TARGET
|
||||
Reference in new issue
Block a user