forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnapshot.ninja
50 lines (37 loc) · 1.73 KB
/
snapshot.ninja
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
48
49
50
releaseMode = -D RELEASE=true
rule bspack
command = ./bin/bspack.exe $releaseMode $flags -main $main -o $out $post_process
depfile = $out.d
generator = true
snapshot_path = 4.06.1
LTO= ../scripts/buckle_lto.js
includes = -I js_parser -I stubs -I ext -I common -I frontend -I gentype -I bsb_helper -I depends -I core -I super_errors -I outcome_printer -I bsb -I ounit -I ounit_tests -I napkin -I main
SNAP=../lib/$snapshot_path
build snapshot: phony $SNAP/whole_compiler.ml $SNAP/bsb_helper.ml $SNAP/unstable/all_ounit_tests.ml
# $SNAP/bspp.ml
build $SNAP/whole_compiler.ml: bspack | ./bin/bspack.exe $LTO
flags = ${releaseMode} -MD -I ml $includes
main = Rescript_compiler_main
post_process = && node $LTO $SNAP/whole_compiler.ml
build $SNAP/bsb_helper.ml: bspack | ./bin/bspack.exe $LTO
flags = -MD ${releaseMode} $includes
main = Bsb_helper_main
build $SNAP/rescript.ml: bspack | ./bin/bspack.exe $LTO
flags = -D BS_MIN_LEX_DEPS=true -MD ${releaseMode} -I ml $includes
main = Rescript_main
o $SNAP/unstable/all_ounit_tests.ml: bspack | ./bin/bspack.exe $LTO
flags = -MD $includes -I ml
main = Ounit_tests_main
o $SNAP/unstable/js_compiler.ml: bspack | ./bin/bspack.exe $LTO
flags = -D BROWSER=true -MD -I ml $includes
main = Jsoo_main
o $SNAP/unstable/js_playground_compiler.ml: bspack | ./bin/bspack.exe $LTO
flags = -D BROWSER=true -MD -I ml $includes
main = Jsoo_playground_main
subninja build.ninja
# -o $@
# Check it later
# rule bsbnative
# command = $ocamlopt -w -a unix.cmxa str.cmxa ./stubs/ext_basic_hash_stubs.c $in -o $out
# only check if it compiles
# o $SNAP/unstable/bsb_native.exe: bsbnative ./bin/bsb_native.ml