Skip to content

Commit 60e2469

Browse files
mrochfacebook-github-bot
authored andcommitted
sync js_of_ocaml dune and ocamlbuild flags
Summary: Changelog: [internal] Reviewed By: SamChou19815 Differential Revision: D41389337 fbshipit-source-id: ece87977260434c1cc4dc816401a56b712ee0ea6
1 parent c75afa2 commit 60e2469

File tree

6 files changed

+15
-16
lines changed

6 files changed

+15
-16
lines changed

Makefile

+2-12
Original file line numberDiff line numberDiff line change
@@ -517,23 +517,13 @@ bin/flow.js: _build/scripts/ppx_gen_flowlibs.exe $(LIBFUZZY_PATH_DEP) $(BUILT_OB
517517
$(INCLUDE_OPTS) $(JS_FINDLIB_OPTS) \
518518
-lflags "$(BYTECODE_LINKER_FLAGS)" \
519519
src/flow_dot_js.byte
520-
# js_of_ocaml has no ability to upgrade warnings to errors, but we want to
521-
# error if, for example, there are any unimplemented C primitives.
522520
js_of_ocaml \
521+
--Werror \
523522
--opt 3 \
524523
--disable genprim \
525524
--extern-fs \
526525
-o bin/flow.js \
527-
$(JS_STUBS) _build/src/flow_dot_js.byte \
528-
2>_build/js_of_ocaml.err; \
529-
ret=$$?; \
530-
if [ ! $$ret ]; then \
531-
exit $$ret; \
532-
elif [ -s _build/js_of_ocaml.err ]; then \
533-
printf "js_of_ocaml produced output on stderr:\n" 1>&2; \
534-
cat _build/js_of_ocaml.err 1>&2; \
535-
exit 1; \
536-
fi
526+
$(JS_STUBS) _build/src/flow_dot_js.byte
537527

538528
js: bin/flow.js
539529

dune

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
(env
22
(_
33
(flags
4-
(:standard -w @a-4-29-35-41-42-44-45-48-50-58-70))))
4+
(:standard -w @a-4-29-35-41-42-44-45-48-50-58-70))
5+
(js_of_ocaml
6+
(flags --disable genprim --Werror))))

dune-project

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
(lang dune 2.8)
1+
(lang dune 3.0)
22
(formatting (enabled_for dune))

src/dune

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
(env
2+
(opt
3+
(js_of_ocaml
4+
(compilation_mode whole_program)
5+
(flags :standard --opt 3))))
6+
17
(executable
28
(name flow)
39
(modes native byte_complete)

src/parser/Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ js:
8282
cd $(TOP); \
8383
$(OCB) -no-links -pkgs js_of_ocaml $(REL_DIR)/flow_parser_dot_js.byte; \
8484
[ -e "$(REL_DIR)/flow_parser.js" -a "$(REL_DIR)/flow_parser.js" -nt "_build/$(REL_DIR)/flow_parser_dot_js.byte" ] || \
85-
js_of_ocaml --opt 3 \
86-
--no-extern-fs \
85+
js_of_ocaml --Werror --disable genprim --opt 3 --no-extern-fs \
8786
-o $(REL_DIR)/flow_parser.js \
8887
_build/$(REL_DIR)/flow_parser_dot_js.byte
8988

src/parser/dune

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
(name flow_parser_dot_js)
1212
(modes js)
1313
(modules flow_parser_js flow_parser_dot_js)
14+
(js_of_ocaml
15+
(flags :standard --no-extern-fs))
1416
(libraries flow_parser js_of_ocaml))
1517

1618
(dirs

0 commit comments

Comments
 (0)