diff options
author | David Allsopp <david.allsopp@metastack.com> | 2017-02-13 19:35:13 +0100 |
---|---|---|
committer | David Allsopp <david.allsopp@metastack.com> | 2017-08-17 15:16:02 +0100 |
commit | 12b20f30f5b8bf1cc9e388331563c8a6ff7a0473 (patch) | |
tree | e8b666db69f9771dc8b6ef52619243704e3bf487 | |
parent | b3f54cb7264cb8b273d98bd119b0ae254a51f2a0 (diff) | |
download | ocaml-12b20f30f5b8bf1cc9e388331563c8a6ff7a0473.tar.gz |
Fix -nostdlib option to ocaml
Search path was initialised before options were parsed, meaning that
-nostdlib had no effect.
-rw-r--r-- | Changes | 5 | ||||
-rw-r--r-- | toplevel/opttopmain.ml | 1 | ||||
-rw-r--r-- | toplevel/topmain.ml | 1 |
3 files changed, 7 insertions, 0 deletions
@@ -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 f3fd291c89..b3350ce04f 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 7a0c07ed21..329183852f 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 |