File tree Expand file tree Collapse file tree 6 files changed +8
-14
lines changed Expand file tree Collapse file tree 6 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 33
33
apk add --update --no-cache --force-overwrite \
34
34
llvm-dev llvm-static g++
35
35
36
- ENV LIBRARY_PATH=/usr/lib/crystal/lib/
37
-
38
36
CMD ["/bin/sh" ]
Original file line number Diff line number Diff line change 26
26
27
27
RUN ln -sf /usr/bin/ld.lld-8 /usr/bin/ld.lld
28
28
29
- ENV LIBRARY_PATH=/usr/lib/crystal/lib/
30
-
31
29
CMD ["/bin/sh" ]
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ RUN git clone https://github.com/crystal-lang/crystal \
85
85
&& git checkout ${crystal_sha1} \
86
86
\
87
87
&& make crystal stats=true static=true ${release:+release=true} \
88
- CRYSTAL_CONFIG_TARGET=${gnu_target} \
88
+ CRYSTAL_CONFIG_TARGET=${gnu_target} CRYSTAL_CONFIG_LIBRARY_PATH= \
89
89
&& ([ "$(ldd .build/crystal | wc -l)" -eq "1" ] || { echo './build/crystal is not statically linked' ; ldd .build/crystal; exit 1; })
90
90
91
91
# Build shards
Original file line number Diff line number Diff line change @@ -96,10 +96,8 @@ _canonicalize_file_path() {
96
96
97
97
SCRIPT_DIR=" $( dirname " $( realpath " $0 " || echo " $0 " ) " ) "
98
98
ROOT_DIR=" $SCRIPT_DIR /.."
99
-
100
- export CRYSTAL_PATH=" ${CRYSTAL_PATH:- " lib:$ROOT_DIR /share/crystal/src" } "
101
- export PATH=" $ROOT_DIR /lib/crystal/bin:$PATH "
102
- export LIBRARY_PATH=" $ROOT_DIR /lib/crystal/lib${LIBRARY_PATH: +: $LIBRARY_PATH } "
99
+ EMBEDDED_CRYSTAL_PATH=$( " $ROOT_DIR /lib/crystal/bin/crystal" env CRYSTAL_PATH)
100
+ export CRYSTAL_PATH=" ${CRYSTAL_PATH:- " $EMBEDDED_CRYSTAL_PATH :$ROOT_DIR /share/crystal/src" } "
103
101
export CRYSTAL_LIBRARY_PATH=" ${CRYSTAL_LIBRARY_PATH: +$CRYSTAL_LIBRARY_PATH : } $ROOT_DIR /lib/crystal/lib"
104
102
105
103
exec " $ROOT_DIR /lib/crystal/bin/crystal" " ${@ } "
Original file line number Diff line number Diff line change 27
27
llvm_bin = Omnibus ::Software . load ( project , "llvm_bin" , nil )
28
28
end
29
29
30
- output_bin = "#{ install_dir } /embedded/bin/crystal"
30
+ output_path = "#{ install_dir } /embedded/bin"
31
+ output_bin = "#{ output_path } /crystal"
31
32
32
33
if FIRST_RUN
33
34
env [ "PATH" ] = "#{ project_dir } /deps:#{ env [ "PATH" ] } "
49
50
command "mkdir .build" , env : env
50
51
command "echo #{ Dir . pwd } " , env : env
51
52
command "cp #{ Dir . pwd } /crystal-#{ ohai [ 'os' ] } -#{ ohai [ 'kernel' ] [ 'machine' ] } .build/crystal" , env : env
52
- command "bin/crystal build src/compiler/ crystal.cr -- release --no-debug -o #{ output_bin } -D without_openssl -D without_zlib " , env : env
53
+ command "make crystal stats=true release=true FLAGS= --no-debug CRYSTAL_CONFIG_LIBRARY_PATH= O= #{ output_path } " , env : env
53
54
54
55
block do
55
56
raise "Could not build crystal" unless File . exists? ( output_bin )
Original file line number Diff line number Diff line change @@ -96,8 +96,7 @@ _canonicalize_file_path() {
96
96
97
97
SCRIPT_PATH=" $( dirname " $( realpath " $0 " || echo $0 ) " ) "
98
98
INSTALL_DIR=" $( realpath " $SCRIPT_PATH /.." ) "
99
- export CRYSTAL_PATH=${CRYSTAL_PATH:- " lib:$INSTALL_DIR /src" }
100
- export PATH=" $INSTALL_DIR /embedded/bin:$PATH "
101
- export LIBRARY_PATH=" $INSTALL_DIR /embedded/lib${LIBRARY_PATH: +: $LIBRARY_PATH } "
99
+ EMBEDDED_CRYSTAL_PATH=$( " $INSTALL_DIR /embedded/bin/crystal" env CRYSTAL_PATH)
100
+ export CRYSTAL_PATH=" ${CRYSTAL_PATH:- " $EMBEDDED_CRYSTAL_PATH :$INSTALL_DIR /src" } "
102
101
export CRYSTAL_LIBRARY_PATH=" ${CRYSTAL_LIBRARY_PATH: +$CRYSTAL_LIBRARY_PATH : } $INSTALL_DIR /embedded/lib"
103
102
" $INSTALL_DIR /embedded/bin/crystal" " $@ "
You can’t perform that action at this time.
0 commit comments