Skip to content

Commit 2b818e4

Browse files
author
Hongbo Zhang
committed
bspack should work with any compiler now and fix errro messages
1 parent 8fcfff1 commit 2b818e4

File tree

7 files changed

+21712
-2059
lines changed

7 files changed

+21712
-2059
lines changed

jscomp/Makefile

+5-7
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,11 @@ release:snapshot
4343
# Carefully check the stored data if it is platform independent
4444

4545
./bin/bspack: ./bin/bspack.mli ./bin/bspack.ml
46-
$(NATIVE) -w -a -I bin -I +compiler-libs ocamlcommon.cmxa unix.cmxa $^ -o $@
46+
$(NATIVE) -w -a -I bin unix.cmxa $^ -o $@
4747

4848
./bin/bsppx: ./bin/bs_ppx.mli ./bin/bs_ppx.ml
4949
$(NATIVE) -g -inline 1000 -linkall -w -a -I bin -I +compiler-libs ocamlcommon.cmxa $^ -o $@
5050

51-
## order matters
52-
_build/bspack: _build/ext/ext.cmxa _build/common/common.cmxa _build/depends/depends.cmxa _build/bspack_main.cmx
53-
$(NATIVE) -I +compiler-libs ocamlcommon.cmxa unix.cmxa $^ -o $@
5451

5552
snapshot: ./bin/bspack snapshotcmj
5653
$(MAKE) snapshotml
@@ -64,12 +61,13 @@ snapshotcmj:
6461
ocamlbuild -cflags $(OCAMLBUILD_CFLAGS) -lflags -I,+compiler-libs,ocamlcommon.cmxa js_pack.native --
6562

6663
# git diff bin/bspack.ml
64+
# bootbspack requires ../ocaml has parser, lexer processed by ocamlyacc and ocamllex
6765
bootbspack: ./bin/bspack
6866
@echo "Bootstrap bspack"
69-
./bin/bspack -I ext -I common -I depends -bs-main bspack_main.ml -o bin/bspack.ml
70-
$(NATIVE) -w -40 -I +compiler-libs unix.cmxa ocamlcommon.cmxa -I bin bin/bspack.mli bin/bspack.ml -o bin/bspack
67+
./bin/bspack -bs-log-mllib bin/bspack.mllib -I ../ocaml/parsing/ -I ../ocaml/utils/ -I ext -I common -I depends -bs-main bspack_main.ml -o bin/bspack.ml
68+
$(NATIVE) -w -40 unix.cmxa -I bin bin/bspack.mli bin/bspack.ml -o bin/bspack
7169
@echo "Using the bootstrapped bspack to genreate new bspack.ml: `date`"
72-
./bin/bspack -I ext -I common -I depends -bs-main bspack_main.ml -o bin/bspack.ml
70+
./bin/bspack -bs-log-mllib bin/bspack.mllib -I ../ocaml/parsing/ -I ../ocaml/utils/ -I ext -I common -I depends -bs-main bspack_main.ml -o bin/bspack.ml
7371
@echo "Bootstrap seems finished, please check diffs in bspack"
7472
@echo "Rebuilding bspack"
7573
make -B ./bin/bspack

0 commit comments

Comments
 (0)