summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1997-11-18 17:14:54 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1997-11-18 17:14:54 +0000
commitc3c1d0604dacecacde7573f5f7030b78cb0ca472 (patch)
tree5859339c323239f8f77044c78f8e73d3195fea0c /driver
parent5e02c08f4c2ed7ecb1baaf08744cc567374b54da (diff)
downloadocaml-c3c1d0604dacecacde7573f5f7030b78cb0ca472.tar.gz
Ajout option -thread a ocamlopt
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1783 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'driver')
-rw-r--r--driver/optcompile.ml8
-rw-r--r--driver/optmain.ml1
2 files changed, 7 insertions, 2 deletions
diff --git a/driver/optcompile.ml b/driver/optcompile.ml
index 897f039106..a7432dbc3e 100644
--- a/driver/optcompile.ml
+++ b/driver/optcompile.ml
@@ -24,8 +24,12 @@ open Typedtree
then the standard library directory. *)
let init_path () =
- load_path :=
- "" :: List.rev (Config.standard_library :: !Clflags.include_dirs);
+ let dirs =
+ if !Clflags.thread_safe then
+ Filename.concat Config.standard_library "threads" :: !Clflags.include_dirs
+ else
+ !Clflags.include_dirs in
+ load_path := "" :: List.rev (Config.standard_library :: dirs);
Env.reset_cache()
(* Return the initial environment in which compilation proceeds. *)
diff --git a/driver/optmain.ml b/driver/optmain.ml
index ad61443671..9ddf8601e3 100644
--- a/driver/optmain.ml
+++ b/driver/optmain.ml
@@ -84,6 +84,7 @@ let main () =
"-pp", Arg.String(fun s -> preprocessor := Some s),
"<command> Pipe sources through preprocessor <command>";
"-S", Arg.Set keep_asm_file, " Keep intermediate assembly file";
+ "-thread", Arg.Set thread_safe, " Use thread-safe standard library";
"-unsafe", Arg.Set fast,
" No bounds checking on array and string access";
"-v", Arg.Unit print_version_number, " Print compiler version number";