prepare-cross-toolchain-unix: Remove the linux/macOS runtimes

This matches what is done in build-all.sh for the PGO step; this
removes rather large (~50 MB) libraries that mostly are needed
for compiling for the host unix platforms. (On Linux it's needed
if building with profiling, on macOS it's needed for the builtin
functions for platform version availability too.)
This commit is contained in:
Martin Storsjö
2025-08-01 23:42:45 +03:00
parent fd7848ea84
commit 2e938d2b66
+5
View File
@@ -44,6 +44,11 @@ CLANG_VERSION=$(basename "$CLANG_RESOURCE_DIR")
rm -rf $DEST/lib/clang/$CLANG_VERSION
cp -a $CLANG_RESOURCE_DIR $DEST/lib/clang/$CLANG_VERSION
# Remove the native Linux/macOS runtimes which aren't needed in
# the final distribution.
rm -rf $DEST/lib/clang/*/lib/darwin
rm -rf $DEST/lib/clang/*/lib/linux
# Copy all arch-specific subdirectories plus the "generic" one, as is.
for arch in generic $ARCHS; do
rm -rf $DEST/$arch-w64-mingw32