Skip to content

Commit 8e4294c

Browse files
OlivierNicolehhugo
authored andcommitted
Make --empty-sourcemap work for whole-program compilation
1 parent 3a8e777 commit 8e4294c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/bin-js_of_ocaml/compile.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ let output_gen
5656
let sm = f ~standalone ~source_map (k, fmt) in
5757
match source_map, sm with
5858
| None, _ | _, None -> ()
59-
| Some { output_file = output; source_map = _; keep_empty = _ }, Some sm ->
59+
| Some { output_file = output; source_map; keep_empty }, Some sm ->
60+
let sm = if keep_empty then Source_map.Standard source_map else sm in
6061
if Debug.find "invariant" () then Source_map.invariant sm;
6162
let urlData =
6263
match output with

0 commit comments

Comments
 (0)