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
15
15
RUN \
16
16
tar -xz -C /usr --strip-component=1 -f /tmp/crystal.tar.gz \
17
17
--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 && \
20
19
rm /tmp/crystal.tar.gz
21
20
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
-
28
21
CMD ["/bin/sh" ]
29
22
30
23
FROM 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 \
27
27
&& ./configure --disable-debug --disable-shared --enable-large-config \
28
28
&& make -j$(nproc)
29
29
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
-
39
30
FROM ${alpine_image}
40
31
41
32
RUN sed -i 's|--list -- "$@"|--list "$@"|' /usr/bin/ldd
@@ -101,17 +92,12 @@ RUN git clone https://github.com/crystal-lang/shards \
101
92
102
93
COPY files/crystal-wrapper /output/bin/crystal
103
94
COPY --from=debian /bdwgc/.libs/libgc.a /libgc-debian.a
104
- COPY --from=debian /crystal/src/ext/libcrystal.a /libcrystal-debian.a
105
95
106
96
ARG package_iteration
107
97
108
98
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
- \
113
99
# Copy libgc.a to /lib/crystal/lib/
114
- && mkdir -p /output/lib/crystal/lib/ \
100
+ mkdir -p /output/lib/crystal/lib/ \
115
101
&& cp /libgc-debian.a /output/lib/crystal/lib/libgc.a \
116
102
\
117
103
# Copy crystal to /lib/crystal/bin/
You can’t perform that action at this time.
0 commit comments