File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ jobs:
228
228
working-directory : ./wasm_of_ocaml
229
229
env :
230
230
WASM_ENGINE : wasmtime
231
- WASI_FLAGS : --enable trap-on-exception
231
+ WASI_FLAGS : --enable exnref
232
232
RUST_BACKTRACE : 0
233
233
continue-on-error : true
234
234
run : opam exec -- dune build @runtest-wasm --profile wasi
Original file line number Diff line number Diff line change @@ -136,12 +136,12 @@ let optimize
136
136
~output_file
137
137
() =
138
138
command
139
- (" wasm-opt"
140
- :: (common_options ()
141
- @ (if Config.Flag. trap_on_exception () then [] else [ " --traps-never-happen" ])
142
- @ (match options with
143
- | Some o -> o
144
- | None -> optimization_options profile)
145
- @ [ Filename. quote input_file; " -o" ; Filename. quote output_file ])
139
+ (( " wasm-opt" :: ( if Config.Flag. exnref () then [ " --emit-exnref " ] else [] ))
140
+ @ (common_options ()
141
+ @ (if Config.Flag. trap_on_exception () then [] else [ " --traps-never-happen" ])
142
+ @ (match options with
143
+ | Some o -> o
144
+ | None -> optimization_options profile)
145
+ @ [ Filename. quote input_file; " -o" ; Filename. quote output_file ])
146
146
@ opt_flag " --input-source-map" opt_input_sourcemap
147
147
@ opt_flag " --output-source-map" opt_output_sourcemap)
Original file line number Diff line number Diff line change @@ -109,6 +109,8 @@ module Flag = struct
109
109
110
110
let wasi = o ~name: " wasi" ~default: false
111
111
112
+ let exnref = o ~name: " exnref" ~default: false
113
+
112
114
let trap_on_exception = o ~name: " trap-on-exception" ~default: false
113
115
end
114
116
Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ module Flag : sig
78
78
79
79
val wasi : unit -> bool
80
80
81
+ val exnref : unit -> bool
82
+
81
83
val trap_on_exception : unit -> bool
82
84
83
85
val enable : string -> unit
You can’t perform that action at this time.
0 commit comments