Skip to content

Commit e5f21df

Browse files
Merge pull request #87 from maxfierke/mf-remove-libcrystal
2 parents 24226f2 + 841480a commit e5f21df

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

docker/alpine.Dockerfile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,9 @@ COPY ${crystal_targz} /tmp/crystal.tar.gz
1515
RUN \
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-
2821
CMD ["/bin/sh"]
2922

3023
FROM runtime as build

linux/Dockerfile

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff 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-
3930
FROM ${alpine_image}
4031

4132
RUN sed -i 's|--list -- "$@"|--list "$@"|' /usr/bin/ldd
@@ -101,17 +92,12 @@ RUN git clone https://github.com/crystal-lang/shards \
10192

10293
COPY files/crystal-wrapper /output/bin/crystal
10394
COPY --from=debian /bdwgc/.libs/libgc.a /libgc-debian.a
104-
COPY --from=debian /crystal/src/ext/libcrystal.a /libcrystal-debian.a
10595

10696
ARG package_iteration
10797

10898
RUN \
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/

0 commit comments

Comments
 (0)