Strip the llvm installation after building
This still inflates the docker image chain since it's done in a separate RUN command though. This tests that one still can (re)build compiler-rt/libunwind/libcxxabi/libcxx after stripping down the llvm installation.
This commit is contained in:
1 parent
2739421564
commit
ca8ce421cd
1 file changed
+6
-5
+6
-5
@@ -21,6 +21,12 @@ ENV TOOLCHAIN_PREFIX=/opt/llvm-mingw
|
|||||||
COPY build-llvm.sh .
|
COPY build-llvm.sh .
|
||||||
RUN ./build-llvm.sh $TOOLCHAIN_PREFIX
|
RUN ./build-llvm.sh $TOOLCHAIN_PREFIX
|
||||||
|
|
||||||
|
# Strip the LLVM install output immediately. (This doesn't reduce the
|
||||||
|
# total docker image size as long as it is in a separate RUN layer though,
|
||||||
|
# but reduces build times if tweaking the contents of strip-llvm.sh.)
|
||||||
|
COPY strip-llvm.sh .
|
||||||
|
RUN ./strip-llvm.sh $TOOLCHAIN_PREFIX
|
||||||
|
|
||||||
ENV TOOLCHAIN_ARCHS="i686 x86_64 armv7 aarch64"
|
ENV TOOLCHAIN_ARCHS="i686 x86_64 armv7 aarch64"
|
||||||
|
|
||||||
# Install the usual $TUPLE-clang binaries
|
# Install the usual $TUPLE-clang binaries
|
||||||
@@ -70,11 +76,6 @@ RUN cd test && \
|
|||||||
COPY build-libssp.sh libssp-Makefile ./
|
COPY build-libssp.sh libssp-Makefile ./
|
||||||
RUN ./build-libssp.sh $TOOLCHAIN_PREFIX
|
RUN ./build-libssp.sh $TOOLCHAIN_PREFIX
|
||||||
|
|
||||||
# Strip the final toolchain. (This doesn't reduce the total docker image
|
|
||||||
# size as long as it is in a separate RUN layer though.)
|
|
||||||
COPY strip-llvm.sh .
|
|
||||||
RUN ./strip-llvm.sh $TOOLCHAIN_PREFIX
|
|
||||||
|
|
||||||
# Cheating: Pull strip and objcopy from the normal binutils package.
|
# Cheating: Pull strip and objcopy from the normal binutils package.
|
||||||
RUN apt-get update -qq && \
|
RUN apt-get update -qq && \
|
||||||
apt-get install -qqy binutils-mingw-w64-x86-64 && \
|
apt-get install -qqy binutils-mingw-w64-x86-64 && \
|
||||||
|
|||||||
Reference in new issue
Block a user