Use -unwindlib=libunwind instead of merging libunwind into libc++

This makes the build of libcxx a bit cleaner, and simplifies later
building and testing of libcxx.
This commit is contained in:
Martin Storsjö committed 2021-10-01 12:31:51 +03:00
1 parent e40ff6ab49
commit e35ef3b7d7
5 files changed
+29 -10

No files matched your search

+10 -9
View File
@@ -193,15 +193,6 @@ build_all() {
cd build-$arch-$type
$BUILDCMD ${CORES+-j$CORES}
$BUILDCMD install
if [ "$type" = "shared" ]; then
llvm-ar qcsL \
"$PREFIX/$arch-w64-mingw32/lib/libc++.dll.a" \
"$PREFIX/$arch-w64-mingw32/lib/libunwind.dll.a"
else
llvm-ar qcsL \
"$PREFIX/$arch-w64-mingw32/lib/libc++.a" \
"$PREFIX/$arch-w64-mingw32/lib/libunwind.a"
fi
cd ..
done
cd ..
@@ -211,3 +202,13 @@ build_all() {
# work when linking against the DLL, but not vice versa.
[ -z "$BUILD_SHARED" ] || build_all shared
[ -z "$BUILD_STATIC" ] || build_all static
# Remove dummy placeholder libunwind.a. If we've built a static version, it
# already was overwritten with a proper one, but if only building a shared
# version, remove the dummy one to avoid surprises.
for arch in $ARCHS; do
# Only remove the file if it contains no members.
if [ -f $PREFIX/$arch-w64-mingw32/lib/libunwind.a ] && [ "$(llvm-ar t $PREFIX/$arch-w64-mingw32/lib/libunwind.a)" = "" ]; then
rm $PREFIX/$arch-w64-mingw32/lib/libunwind.a
fi
done