File tree Expand file tree Collapse file tree 2 files changed +2
-23
lines changed Expand file tree Collapse file tree 2 files changed +2
-23
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,9 @@ COPY ${crystal_targz} /tmp/crystal.tar.gz
1515RUN \
1616 tar -xz -C /usr --strip-component=1 -f /tmp/crystal.tar.gz \
1717 --exclude */lib/crystal/lib \
18- --exclude */share/crystal/src/llvm/ext/llvm_ext.o \
19- --exclude */share/crystal/src/ext/libcrystal.a && \
18+ --exclude */share/crystal/src/llvm/ext/llvm_ext.o && \
2019 rm /tmp/crystal.tar.gz
2120
22- # Build libcrystal
23- RUN \
24- cd /usr/share/crystal && \
25- cc -fPIC -c -o src/ext/sigfault.o src/ext/sigfault.c && \
26- ar -rcs src/ext/libcrystal.a src/ext/sigfault.o
27-
2821CMD ["/bin/sh" ]
2922
3023FROM runtime as build
Original file line number Diff line number Diff line change @@ -27,15 +27,6 @@ RUN git clone https://github.com/ivmai/bdwgc \
2727 && ./configure --disable-debug --disable-shared --enable-large-config \
2828 && make -j$(nproc)
2929
30- # Cross-compile crystal and build libcrystal.a
31- ARG crystal_sha1
32- ARG musl_target
33- RUN git clone https://github.com/crystal-lang/crystal \
34- && cd crystal \
35- && git checkout ${crystal_sha1} \
36- \
37- && make deps
38-
3930FROM ${alpine_image}
4031
4132RUN sed -i 's|--list -- "$@"|--list "$@"|' /usr/bin/ldd
@@ -101,17 +92,12 @@ RUN git clone https://github.com/crystal-lang/shards \
10192
10293COPY files/crystal-wrapper /output/bin/crystal
10394COPY --from=debian /bdwgc/.libs/libgc.a /libgc-debian.a
104- COPY --from=debian /crystal/src/ext/libcrystal.a /libcrystal-debian.a
10595
10696ARG package_iteration
10797
10898RUN \
109- # Remove musl binaries from source and replace with debian ones
110- rm -Rf /crystal/src/{llvm/ext/llvm_ext.o,ext/sigfault.o,ext/libcrystal.a} \
111- && mv /libcrystal-debian.a /crystal/src/ext/libcrystal.a \
112- \
11399 # Copy libgc.a to /lib/crystal/lib/
114- && mkdir -p /output/lib/crystal/lib/ \
100+ mkdir -p /output/lib/crystal/lib/ \
115101 && cp /libgc-debian.a /output/lib/crystal/lib/libgc.a \
116102 \
117103 # Copy crystal to /lib/crystal/bin/
You can’t perform that action at this time.
0 commit comments