From 12b20f30f5b8bf1cc9e388331563c8a6ff7a0473 Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Mon, 13 Feb 2017 19:35:13 +0100 Subject: [PATCH] Fix -nostdlib option to ocaml Search path was initialised before options were parsed, meaning that -nostdlib had no effect. --- Changes | 5 +++++ toplevel/opttopmain.ml | 1 + toplevel/topmain.ml | 1 + 3 files changed, 7 insertions(+) diff --git a/Changes b/Changes index 764f127b6..46ada6e3b 100644 --- a/Changes +++ b/Changes @@ -252,6 +252,11 @@ Working version calls over the lifetime of a program when using Spacetime profiling (Mark Shinwell) +### Toplevel: + +- GPR#1041: -nostdlib no longer ignored by toplevel. + (David Allsopp, review by Xavier Leroy) + ### Compiler distribution build system - MPR#6373, GPR#1093: Suppress trigraph warnings from macOS assembler diff --git a/toplevel/opttopmain.ml b/toplevel/opttopmain.ml index f3fd291c8..b3350ce04 100644 --- a/toplevel/opttopmain.ml +++ b/toplevel/opttopmain.ml @@ -254,4 +254,5 @@ let main () = | Arg.Help msg -> Format.fprintf Format.std_formatter "%s%!" msg; exit 0 end; if not (prepare Format.err_formatter) then exit 2; + Compmisc.init_path true; Opttoploop.loop Format.std_formatter diff --git a/toplevel/topmain.ml b/toplevel/topmain.ml index 7a0c07ed2..329183852 100644 --- a/toplevel/topmain.ml +++ b/toplevel/topmain.ml @@ -168,4 +168,5 @@ let main () = end; Compenv.readenv ppf Before_link; if not (prepare ppf) then exit 2; + Compmisc.init_path false; Toploop.loop Format.std_formatter