|
1 |
| - |
2 |
| - |
3 |
| - |
4 | 1 | //@ts-check
|
| 2 | + |
| 3 | +// -inline 1000 makes size too large |
| 4 | +// # TODO: make sure it can be bootstrapped, at least is a very good |
| 5 | +// # test case of our optimizations |
| 6 | +// # build bsdep.exe: cc bsdep.mli bsdep.ml |
5 | 7 | /**
|
6 |
| - * |
7 |
| - * @param {{ocamlopt : string ; ext : string ; INCL : string, isWin : boolean}} config |
8 |
| - * |
| 8 | + * |
| 9 | + * @param {{ocamlopt : string ; ext : string ; INCL : string, isWin : boolean}} config |
| 10 | + * |
9 | 11 | */
|
10 |
| -function libNinja(config){ |
11 |
| - return ` |
| 12 | +function libNinja(config) { |
| 13 | + return ` |
12 | 14 | ocamlopt = ${config.ocamlopt}
|
13 | 15 | ext = ${config.ext}
|
14 | 16 | INCL = ${config.INCL}
|
15 | 17 | flags = -nodynlink -I $INCL -g -w -a ../jscomp/stubs/ext_basic_hash_stubs.c
|
16 | 18 | rule cc
|
17 |
| - command = $ocamlopt -O2 $flags $in -o $out ${config.isWin? '' : '&& strip $out'} |
| 19 | + command = $ocamlopt -O2 $flags $in -o $out ${ |
| 20 | + config.isWin ? "" : "&& strip $out" |
| 21 | + } |
18 | 22 | description = Making $out
|
19 |
| -# -inline 1000 makes size too large |
20 |
| -# TODO: make sure it can be bootstrapped, at least is a very good |
21 |
| -# test case of our optimizations |
22 |
| -# build bsdep.exe: cc bsdep.mli bsdep.ml |
23 | 23 | build bsppx$ext: cc $INCL/bsppx.mli $INCL/bsppx.ml
|
| 24 | + flags = $flags -unboxed-types |
24 | 25 | # build bspp.exe: cc bspp.mli bspp.ml
|
25 | 26 | build bsb$ext: cc $INCL/bsb.mli $INCL/bsb.ml
|
26 |
| - flags = $flags unix.cmxa str.cmxa |
| 27 | + flags = $flags -unboxed-types unix.cmxa str.cmxa |
27 | 28 | build bsb_helper$ext: cc $INCL/bsb_helper.mli $INCL/bsb_helper.ml
|
28 |
| - flags = $flags -w -a |
| 29 | + flags = $flags -unboxed-types -w -a |
29 | 30 | build refmt$ext: cc $INCL/refmt_main3.mli $INCL/refmt_main3.ml
|
30 |
| - flags = $flags -w -40-30 -no-alias-deps -I +compiler-libs ocamlcommon.cmxa |
| 31 | + flags = $flags -w -40-30 -no-alias-deps -I +compiler-libs ocamlcommon.cmxa |
31 | 32 | build bsc$ext: cc $INCL/whole_compiler.mli $INCL/whole_compiler.ml
|
32 |
| -` |
| 33 | + flags = $flags -unboxed-types |
| 34 | +`; |
33 | 35 | }
|
34 | 36 |
|
35 |
| -exports.libNinja = libNinja |
| 37 | +exports.libNinja = libNinja; |
0 commit comments