Remove the workaround with the initial, dummy empty libunwind.a
This reverts parts of commit e35ef3b7d7.
This is now handled better upstream, since
7af584ed87cc6eddb6adbc451c90fb8867469e06 in llvm-project
(November 5th 2021).
This commit is contained in:
1 parent
81c39dda6a
commit
89af3e6a71
2 files changed
+1
-26
No files matched your search
+1
-16
@@ -100,22 +100,7 @@ for arch in $ARCHS; do
|
|||||||
$BUILDCMD ${CORES+-j$CORES}
|
$BUILDCMD ${CORES+-j$CORES}
|
||||||
$BUILDCMD install
|
$BUILDCMD install
|
||||||
mkdir -p "$PREFIX/$arch-w64-mingw32/bin"
|
mkdir -p "$PREFIX/$arch-w64-mingw32/bin"
|
||||||
if [ -z "$SANITIZERS" ]; then
|
if [ -n "$SANITIZERS" ]; then
|
||||||
# Building builtins only. If libunwind isn't built yet, linking of any
|
|
||||||
# executable will still fail as we're using -unwindlib=libunwind.
|
|
||||||
# Therefore, create a dummy libunwind.a (unless there's a real
|
|
||||||
# libunwind installed already) to let linking succeed.
|
|
||||||
#
|
|
||||||
# This is a workaround to avoid needing to specify -unwindlib=none
|
|
||||||
# for all linking until libunwind has been built. This avoids
|
|
||||||
# needing to build libunwind right away (allowing building plain C
|
|
||||||
# executables already now) and avoids needing to pass -unwindlib=none
|
|
||||||
# when configuring the libunwind build.
|
|
||||||
if [ ! -f $PREFIX/$arch-w64-mingw32/lib/libunwind.a ] && [ ! -f $PREFIX/$arch-w64-mingw32/lib/libunwind.dll.a ]; then
|
|
||||||
# Create an archive, don't add any members.
|
|
||||||
llvm-ar rcs $PREFIX/$arch-w64-mingw32/lib/libunwind.a
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
mv "$PREFIX/lib/clang/$CLANG_VERSION/lib/windows/"*.dll "$PREFIX/$arch-w64-mingw32/bin"
|
mv "$PREFIX/lib/clang/$CLANG_VERSION/lib/windows/"*.dll "$PREFIX/$arch-w64-mingw32/bin"
|
||||||
fi
|
fi
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
@@ -194,13 +194,3 @@ build_all() {
|
|||||||
# work when linking against the DLL, but not vice versa.
|
# work when linking against the DLL, but not vice versa.
|
||||||
[ -z "$BUILD_SHARED" ] || build_all shared
|
[ -z "$BUILD_SHARED" ] || build_all shared
|
||||||
[ -z "$BUILD_STATIC" ] || build_all static
|
[ -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
|
|
||||||
Reference in new issue
Block a user