summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Allsopp <david.allsopp@metastack.com>2017-02-13 19:35:13 +0100
committerDavid Allsopp <david.allsopp@metastack.com>2017-08-17 15:16:02 +0100
commit12b20f30f5b8bf1cc9e388331563c8a6ff7a0473 (patch)
treee8b666db69f9771dc8b6ef52619243704e3bf487
parentb3f54cb7264cb8b273d98bd119b0ae254a51f2a0 (diff)
downloadocaml-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--Changes5
-rw-r--r--toplevel/opttopmain.ml1
-rw-r--r--toplevel/topmain.ml1
3 files changed, 7 insertions, 0 deletions
diff --git a/Changes b/Changes
index 764f127b6e..46ada6e3b6 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 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