File tree Expand file tree Collapse file tree 5 files changed +19
-6
lines changed Expand file tree Collapse file tree 5 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,10 @@ darwin-previous: $(CURDIR)/../omnibus/crystal-darwin-x86_64 ## download previous
43
43
$(CURDIR ) /../omnibus/crystal-darwin-x86_64 :
44
44
curl -L -o /tmp/crystal-darwin-x86_64.tar.gz $(PREVIOUS_CRYSTAL_RELEASE_DARWIN_TARGZ ) \
45
45
&& tar xfz /tmp/crystal-darwin-x86_64.tar.gz -O " crystal-*/embedded/bin/crystal" > $(CURDIR ) /../omnibus/crystal-darwin-x86_64 \
46
+ && tar xfz /tmp/crystal-darwin-x86_64.tar.gz -O " crystal-*/embedded/bin/shards" > $(CURDIR ) /../omnibus/shards-darwin-x86_64 \
46
47
&& rm /tmp/crystal-darwin-x86_64.tar.gz \
47
- && chmod +x $(CURDIR ) /../omnibus/crystal-darwin-x86_64
48
+ && chmod +x $(CURDIR ) /../omnibus/crystal-darwin-x86_64 \
49
+ && chmod +x $(CURDIR ) /../omnibus/shards-darwin-x86_64
48
50
49
51
$(OUTPUT_DIR ) /$(DARWIN_NAME ) $(OUTPUT_DIR ) /$(DARWIN_PKG_NAME ) : # # Build omnibus crystal project
50
52
ifeq ($(FORCE_GIT_TAGGED ) , 0)
Original file line number Diff line number Diff line change @@ -21,9 +21,11 @@ FROM runtime as build
21
21
22
22
RUN \
23
23
apt-get update && \
24
- apt-get install -y build-essential llvm-8 libedit-dev gdb && \
24
+ apt-get install -y build-essential llvm-8 lld-8 libedit-dev gdb && \
25
25
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
26
26
27
+ RUN ln -sf /usr/bin/ld.lld-8 /usr/bin/ld.lld
28
+
27
29
ENV LIBRARY_PATH=/usr/lib/crystal/lib/
28
30
29
31
CMD ["/bin/sh" ]
Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ ADD ${previous_crystal_release} /tmp/crystal.tar.gz
73
73
ENV PATH=${PATH}:/tmp/crystal/lib/crystal/bin/
74
74
RUN mkdir -p /tmp/crystal \
75
75
&& tar xz -f /tmp/crystal.tar.gz -C /tmp/crystal --strip-component=1 \
76
- && crystal --version
76
+ && crystal --version \
77
+ && shards --version
77
78
78
79
# Build crystal
79
80
ARG crystal_version
@@ -93,11 +94,13 @@ ARG musl_target
93
94
RUN git clone https://github.com/crystal-lang/shards \
94
95
&& cd shards \
95
96
&& git checkout ${shards_version} \
97
+ && shards install --production \
96
98
\
97
99
# Hack to make shards not segfault
98
100
&& echo 'require "llvm/lib_llvm"; require "llvm/enums"; require "./src/shards"' > hack.cr \
99
101
&& /crystal/bin/crystal build --stats --target ${musl_target} \
100
- hack.cr -o shards --static ${release:+--release}
102
+ hack.cr -o shards --static ${release:+--release} \
103
+ && ([ "$(ldd shards | wc -l)" -eq "1" ] || { echo 'shards is not statically linked' ; ldd shards; exit 1; })
101
104
102
105
COPY files/crystal-wrapper /output/bin/crystal
103
106
COPY --from=debian /bdwgc/.libs/libgc.a /libgc-debian.a
Original file line number Diff line number Diff line change 19
19
PREVIOUS_CRYSTAL_RELEASE_LINUX64_TARGZ ?= # # url to crystal-{version}-{package}-linux-x86_64.tar.gz
20
20
PREVIOUS_CRYSTAL_RELEASE_LINUX32_TARGZ ?= # # url to crystal-{version}-{package}-linux-i686.tar.gz
21
21
22
- SHARDS_VERSION = v0.8.1
22
+ SHARDS_VERSION = v0.10.0
23
23
GC_VERSION = v8.0.4
24
24
LIBATOMIC_OPS_VERSION = v7.6.10
25
25
Original file line number Diff line number Diff line change 1
- SHARDS_VERSION = "0.8.1 "
1
+ SHARDS_VERSION = "0.10.0 "
2
2
3
3
name "shards"
4
4
default_version SHARDS_VERSION
18
18
source md5 : "f5b5108d798b1d86d2b9b45c3a2b5293"
19
19
end
20
20
21
+ version "0.10.0" do
22
+ source md5 : "f982f2dc0c796763205bd0de68e9f87e"
23
+ end
24
+
21
25
source url : "https://github.com/crystal-lang/shards/archive/v#{ version } .tar.gz"
22
26
23
27
relative_path "shards-#{ version } "
24
28
env = with_standard_compiler_flags ( with_embedded_path )
25
29
26
30
build do
31
+ command "#{ Dir . pwd } /shards-#{ ohai [ 'os' ] } -#{ ohai [ 'kernel' ] [ 'machine' ] } install --production" , env : env
32
+
27
33
command "#{ install_dir } /bin/crystal" \
28
34
" build" \
29
35
" -o #{ install_dir } /embedded/bin/shards" \
You can’t perform that action at this time.
0 commit comments