-
Notifications
You must be signed in to change notification settings - Fork 2
/
compile.sh
executable file
·48 lines (40 loc) · 1.17 KB
/
compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
#rm -rf build
find runtime -name \*.[ao] -ls -exec rm {} \;
export CFLAGS="-Wunused-but-set-variable -DSTACK_GC_SANITY -Wall"
arch_flags="-j 8"
make $arch_flags dirs &&
make $arch_flags runtime &&
make $arch_flags compiler &&
make $arch_flags basis-no-check &&
make $arch_flags script &&
make $arch_flags mlbpathmap &&
make $arch_flags constants &&
make $arch_flags libraries
cat <<EOF
Try:
./build/bin/mlton -codegen c -keep g -debug true -expert true -verbose 3 -keep ssa -keep ssa2 -keep rssa -keep machine -cc-opt -O0 ub/justprint.sml
./justprint
adjust STACKLET_DEBUG in include/c-chunk.h and
cp include/c-chunk.h build/lib/include/
to debug stacklets
EOF
exit 0
TARGET=x86_64-pc-linux-gnu
arch_flags="TARGET=$TARGET TARGET_OS=linux TARGET_ARCH=x86"
make dirs &&
cd runtime && make clean && cd .. &&
make runtime &&
make compiler &&
make basis-no-check &&
make script &&
make mlbpathmap &&
make constants &&
make libraries &&
cd runtime && make clean && cd .. &&
mkdir build/lib/targets/$TARGET/ &&
mkdir build/lib/targets/$TARGET/include &&
mkdir build/lib/targets/$TARGET/sml &&
make $arch_flags runtime &&
make constants &&
make mlbpathmap