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
1 change: 1 addition & 0 deletions src/driver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,7 @@ let standalone_run_as_ppx_rewriter () =
;;

let standalone () =
Compiler_specifics.read_clflags_from_env ();
try
if Array.length Caml.Sys.argv >= 2 &&
match Caml.Sys.argv.(1) with
Expand Down
9 changes: 6 additions & 3 deletions src/gen-compiler_specifics
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ let () =
let oc = open_out_bin Sys.argv.(2) in
let pr fmt = fprintf oc (fmt ^^ "\n") in
pr "module O = Ocaml_common";
if ver < (4, 08) then
pr "let get_load_path () = !Ocaml_common.Config.load_path"
else
if ver < (4, 08) then (
pr "let get_load_path () = !Ocaml_common.Config.load_path";
pr "let read_clflags_from_env () = ()"
) else (
pr "let get_load_path () = Ocaml_common.Load_path.get_paths ()";
pr "let read_clflags_from_env () = Ocaml_common.Compmisc.read_clflags_from_env ()"
);
close_out oc