Skip to content

Commit 92cc722

Browse files
committed
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.)
1 parent f00abf0 commit 92cc722

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

prepare-cross-toolchain-unix.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ CLANG_VERSION=$(basename "$CLANG_RESOURCE_DIR")
4444
rm -rf $DEST/lib/clang/$CLANG_VERSION
4545
cp -a $CLANG_RESOURCE_DIR $DEST/lib/clang/$CLANG_VERSION
4646

47+
# Remove the native Linux/macOS runtimes which aren't needed in
48+
# the final distribution.
49+
rm -rf $DEST/lib/clang/*/lib/darwin
50+
rm -rf $DEST/lib/clang/*/lib/linux
51+
4752
# Copy all arch-specific subdirectories plus the "generic" one, as is.
4853
for arch in generic $ARCHS; do
4954
rm -rf $DEST/$arch-w64-mingw32

0 commit comments

Comments
 (0)