Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions compiler/bin-js_of_ocaml/compile.ml
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,11 @@ let run
List.iter cma.lib_units ~f:(fun cmo ->
let output_file =
match output_file with
| `Stdout, false -> `Name (gen_unit_filename "./" cmo)
| `Name x, false -> `Name (gen_unit_filename (Filename.dirname x) cmo)
| `Stdout, false -> gen_unit_filename "./" cmo
| `Name x, false -> gen_unit_filename (Filename.dirname x) cmo
| `Name x, true
when String.length x > 0 && Char.equal x.[String.length x - 1] '/' ->
`Name (gen_unit_filename x cmo)
gen_unit_filename x cmo
| `Stdout, true | `Name _, true ->
failwith "use [-o dirname/] or remove [--keep-unit-names]"
in
Expand All @@ -293,7 +293,7 @@ let run
in
if times ()
then Format.eprintf " parsing: %a (%s)@." Timer.print t1 cmo.cu_name;
output_partial code output_file)
output_partial code (`Name output_file))
| `Cma cma ->
let t1 = Timer.make () in
let code =
Expand Down
Loading