@@ -177,7 +177,7 @@ let compile_group ({filename = file_name; env;} as meta : Lam_stats.meta)
177177 it's used or not
178178 [non_export] is only used in playground
179179*)
180- let compile ~filename non_export env _sigs lam =
180+ let compile ~filename output_prefix non_export env _sigs lam =
181181 let export_idents =
182182 if non_export then
183183 []
@@ -401,7 +401,7 @@ let compile ~filename non_export env _sigs lam =
401401 in
402402 (if not @@ Ext_string. is_empty filename then
403403 Js_cmj_format. to_file
404- ( Ext_filename. chop_extension ~loc: __LOC__ filename ^ " .cmj " ) v);
404+ (output_prefix ^ Js_config. cmj_ext ) v);
405405 Js_program_loader. decorate_deps required_modules v.effect js
406406 )
407407 | _ -> raise Not_a_module
@@ -415,14 +415,15 @@ let lambda_as_module
415415 env
416416 (sigs : Types.signature )
417417 (filename : string )
418+ (output_prefix : string )
418419 (lam : Lambda.lambda ) =
419420 begin
420421 Lam_current_unit. set_file filename ;
421422 Lam_current_unit. iset_debug_file " tuple_alloc.ml" ;
422423 Ext_pervasives. with_file_as_chan
423424 (Js_config. get_output_file filename)
424425 (fun chan -> Js_dump. dump_deps_program
425- (compile ~filename false env sigs lam) chan)
426+ (compile ~filename output_prefix false env sigs lam) chan)
426427 end
427428(* We can use {!Env.current_unit = "Pervasives"} to tell if it is some specific module,
428429 We need handle some definitions in standard libraries in a special way, most are io specific,
0 commit comments