Skip to content

Commit 9274722

Browse files
committed
Add dune profile for native effects
1 parent 1536064 commit 9274722

File tree

7 files changed

+19
-1
lines changed

7 files changed

+19
-1
lines changed

compiler/tests-dynlink-js/effects_flags.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ let () =
44
match l, major >= 5 with
55
| [ "with-effects-double-translation" ], true -> [ "--effects"; "double-translation" ]
66
| [ "with-effects" ], true -> [ "--effects"; "cps" ]
7+
| [ "with-native-effects" ], true -> [ "--effects"; "cps" ]
78
| _ -> [ "--effects"; "disabled" ]
89
in
910
match Sys.argv |> Array.to_list |> List.tl with

compiler/tests-jsoo/lib-effects/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
(env
22
(with-effects-double-translation)
33
(with-effects)
4+
(with-native-effects)
45
(_
56
(js_of_ocaml
67
(flags

compiler/tests-ocaml/effect-syntax/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
(env
22
(with-effects-double-translation)
33
(with-effects)
4+
(with-native-effects)
45
(_
56
(js_of_ocaml
67
(flags

compiler/tests-ocaml/effects/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
(env
22
(with-effects-double-translation)
33
(with-effects)
4+
(with-native-effects)
45
(_
56
(js_of_ocaml
67
(flags

compiler/tests-sourcemap/dune

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
(name test)
88
(modules test)
99
(enabled_if
10-
(<> %{profile} with-effects))
10+
(and
11+
(<> %{profile} with-effects)
12+
(<> %{profile} with-native-effects)))
1113
(modes js)
1214
(js_of_ocaml
1315
(link_flags

dune

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@
3636
(binaries
3737
(tools/node_wrapper.exe as node)
3838
(tools/node_wrapper.exe as node.exe)))
39+
(with-native-effects
40+
(js_of_ocaml
41+
;; Native effects is not supported in js
42+
(enabled_if false))
43+
(wasm_of_ocaml
44+
(compilation_mode whole_program)
45+
(flags
46+
(:standard --effects native)))
47+
(binaries
48+
(tools/node_wrapper.exe as node)
49+
(tools/node_wrapper.exe as node.exe)))
3950
(bench_no_debug
4051
(flags
4152
(:standard \ -g))

toplevel/examples/lwt_toplevel/effects_flags.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ let () =
44
match l, major >= 5 with
55
| [ "with-effects-double-translation" ], true -> [ "--effects"; "double-translation" ]
66
| [ "with-effects" ], true -> [ "--effects"; "cps" ]
7+
| [ "with-native-effects" ], true -> [ "--effects"; "cps" ]
78
| _, true -> [ "--effects"; "cps" ]
89
| _, false -> [ "--effects"; "disabled" ]
910
in

0 commit comments

Comments
 (0)