@@ -20,6 +20,7 @@ numbered_commits=(
2020 026_eeb1a89b82c9bdee5c8942604b3f8b2b9a2e786d # <--- "./windows_setup.sh --small" starts from here! (release 2025-12-23-0400)
2121 027_3f878188ab2f5784514bb0c19057bee37c98bd60 # accept @public decorator on methods
2222 028_cb88ac4b437db34545d1249c93ff61605ae59644 # <--- bootstrap_transpiler.py starts here!
23+ 029_95e29106b13cda7ef33c7e934ed67158463a88e9 # support for INFINITY and NAN constants, array_end() built-in
2324)
2425
2526# This should be an item of the above list according to what
3637
3738if [[ " ${OS:= $(uname)} " =~ Windows ]]; then
3839 source activate
39- make=" mingw32-make"
4040 exe_suffix=" .exe"
4141else
42- make=" make"
4342 exe_suffix=" "
4443fi
4544
@@ -203,52 +202,28 @@ function compile_next_jou_compiler() {
203202
204203 if [[ " $OS " =~ Windows ]]; then
205204 echo " Copying LLVM files..."
206- # These files used to be in a separate "libs" folder next to mingw64 folder.
207- # Now they are in mingw64/lib.
208- # They were also named slightly differently before.
209- if [ $number -le 16 ]; then
210- mkdir $folder /libs
211- for f in ${windows_llvm_files[@]} ; do
212- cp $f $folder /libs/$( basename -s .dll.a $f ) .a
213- done
214- else
215- mkdir -p $folder /mingw64/lib
216- cp ${windows_llvm_files[@]} $folder /mingw64/lib/
217- fi
205+ mkdir -p $folder /mingw64/lib
206+ cp ${windows_llvm_files[@]} $folder /mingw64/lib/
218207 fi
219208
220209 (
221210 cd $folder
222211
223- if [ $number -eq 23 ]; then
224- # I changed how the assert statement works: the new compiler imports
225- # "stdlib/assert.jou" in every file that uses `assert`, and the old
226- # compiler doesn't expect it so it gives a bunch of unused import
227- # warnings. Let's get rid of the warnings.
228- echo " Deleting stdlib/assert.jou imports..."
229- sed -i -e ' /import "stdlib\/assert.jou"/d' compiler/* .jou compiler/* /* .jou
230- fi
231-
232212 echo " Deleting version check..."
233213 sed -i -e " /Found unsupported LLVM version/d" Makefile.*
234214
235- echo " Running make..."
236-
237- # The jou_bootstrap(.exe) file should never be rebuilt.
238- # We don't want bootstrap inside bootstrap.
239- local make_flags=" --old-file jou_bootstrap$exe_suffix "
240-
215+ echo " Compiling Jou compiler with the previous Jou compiler..."
216+ # We don't do this with make, because it might decide to build
217+ # jou_bootstrap(.exe) for whatever reason, and we don't want bootstrap
218+ # inside bootstrap.
241219 if [[ " $OS " =~ Windows ]]; then
242220 # Use correct path to mingw64. This used to copy the mingw64 folder,
243221 # but it was slow and wasted disk space. Afaik symlinks aren't really a
244222 # thing on windows.
245- make_flags= " $make_flags JOU_MINGW_DIR=../../../mingw64"
223+ JOU_MINGW_DIR=../../../mingw64 ./jou_bootstrap.exe -o jou.exe compiler/main.jou
246224 else
247- # Also don't rebuild config.jou
248- make_flags=" $make_flags --old-file config.jou"
225+ ./jou_bootstrap -o jou compiler/main.jou
249226 fi
250-
251- $make $make_flags jou$exe_suffix
252227 )
253228}
254229
0 commit comments