Skip to content

Commit 2a1dd6f

Browse files
committed
Size optimization
1 parent cc62789 commit 2a1dd6f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docker/trzeci/emscripten-upstream/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,20 @@ RUN echo "## Create Testing Script" \
125125
\
126126
&& echo "## Done"
127127

128+
# Clean up emscripten installation and strip some symbols
129+
130+
RUN apt-get -qq -y update && apt-get -qq install -y --no-install-recommends \
131+
binutils \
132+
&& . ${EMSDK}/emsdk_set_env.sh \
133+
# Remove debugging symbols from embedded node (extra 7MB)
134+
&& strip -s `which node` \
135+
# Tests consume ~80MB disc space
136+
&& rm -fr ${EMSDK}/upstream/emscripten/tests \
137+
# strip out symbols from clang (extra 50MB!)
138+
&& find ${EMSDK}/upstream/bin -type f -exec strip -s {} + || true \
139+
&& find ${EMSDK}/upstream/fastcomp/bin -type f -exec strip -s {} + || true \
140+
&& echo "## Done"
141+
128142
# Populate Emscripten SDK cache with libc++, to improve further compilation times.
129143
RUN echo "## Pre-populate cache" \
130144
&& . ${EMSDK}/emsdk_set_env.sh \

0 commit comments

Comments
 (0)