Skip to content

Commit 694d202

Browse files
authored
jsoo build with "dune build --profile browser" (#6075)
1 parent 65799f5 commit 694d202

File tree

8 files changed

+33
-14
lines changed

8 files changed

+33
-14
lines changed

jscomp/bsb_exe/dune

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
(executable
77
(name rescript_main)
88
(public_name rescript)
9+
(enabled_if
10+
(<> %{profile} browser))
911
(flags
1012
(:standard -w +a-4-9-40-41-42-70))
1113
(libraries bsb common ext str unix))

jscomp/bsb_helper_exe/dune

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
(executable
77
(name bsb_helper_main)
88
(public_name bsb_helper)
9+
(enabled_if
10+
(<> %{profile} browser))
911
(flags
1012
(:standard -w +a-9-40-42))
1113
(libraries bsb_helper))

jscomp/dune

+5
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@
1414
(static
1515
(env-vars
1616
(CPPO_FLAGS -D=RELEASE))
17+
(ocamlopt_flags
18+
(:standard -O3 -unbox-closures)))
19+
(browser
20+
(env-vars
21+
(CPPO_FLAGS -D=BROWSER))
1722
(ocamlopt_flags
1823
(:standard -O3 -unbox-closures))))

jscomp/jsoo/dune

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
; Don't build the JS compiler by default as it slows down CI considerably.
22

3-
; (executables
4-
; (names jsoo_main jsoo_playground_main)
5-
; (modes js)
6-
; (flags
7-
; (:standard -w +a-4-9-40-42-44-45))
8-
; (libraries core ml super_errors))
3+
(executables
4+
(names jsoo_main jsoo_playground_main)
5+
(modes js)
6+
(enabled_if
7+
(= %{profile} browser))
8+
(flags
9+
(:standard -w +a-4-9-40-42-44-45))
10+
(libraries core ml super_errors))

jscomp/ounit_tests/dune

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
(executable
77
(name ounit_tests_main)
88
(public_name ounit_tests)
9+
(enabled_if
10+
(<> %{profile} browser))
911
(flags
1012
(:standard -w +a-4-9-30-40-41-42-48-70))
1113
(libraries bsb bsb_helper core ounit2))

res_syntax/benchmarks/dune

+10-8
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
(name benchmark)
88
(public_name syntax_benchmarks)
99
(enabled_if
10-
(or
11-
(= %{system} macosx)
12-
; or one of Linuxes (see https://github.com/ocaml/ocaml/issues/10613)
13-
(= %{system} linux)
14-
(= %{system} linux_elf)
15-
(= %{system} elf)
16-
(= %{system} linux_eabihf)
17-
(= %{system} linux_eabi)))
10+
(and
11+
(<> %{profile} browser)
12+
(or
13+
(= %{system} macosx)
14+
; or one of Linuxes (see https://github.com/ocaml/ocaml/issues/10613)
15+
(= %{system} linux)
16+
(= %{system} linux_elf)
17+
(= %{system} elf)
18+
(= %{system} linux_eabihf)
19+
(= %{system} linux_eabi))))
1820
(flags
1921
(:standard -w +a-4-40-42-70))
2022
(foreign_stubs

res_syntax/cli/dune

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
(executable
77
(name res_cli)
88
(public_name res_parser)
9+
(enabled_if
10+
(<> %{profile} browser))
911
(flags
1012
(:standard -w +a-4-42-40-9-48-70))
1113
(libraries syntax))

res_syntax/testrunner/dune

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
(executable
77
(name res_test)
88
(public_name syntax_tests)
9+
(enabled_if
10+
(<> %{profile} browser))
911
(flags
1012
(:standard -w +a-40-42-70))
1113
(libraries syntax core))

0 commit comments

Comments
 (0)