File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
compiler/bin-wasm_of_ocaml Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -262,7 +262,20 @@ let run
262262 if times () then Format. eprintf " parsing js: %a@." Timer. print t1;
263263 if times () then Format. eprintf " Start parsing...@." ;
264264 let need_debug = enable_source_maps || Config.Flag. debuginfo () in
265+ let check_debug (one : Parse_bytecode.one ) =
266+ if (not runtime_only)
267+ && enable_source_maps
268+ && Parse_bytecode.Debug. is_empty one.debug
269+ && not (Code. is_empty one.code)
270+ then
271+ warn
272+ " Warning: '--source-map' is enabled but the bytecode program was compiled with \
273+ no debugging information.\n \
274+ Warning: Consider passing '-g' option to ocamlc.\n \
275+ %!"
276+ in
265277 let output (one : Parse_bytecode.one ) ~unit_name ch =
278+ check_debug one;
266279 let code = one.code in
267280 let standalone = Option. is_none unit_name in
268281 let live_vars, in_cps, p, debug =
You can’t perform that action at this time.
0 commit comments