summaryrefslogtreecommitdiff
path: root/driver/main.ml
diff options
context:
space:
mode:
authorJérémie Dimino <jeremie@dimino.org>2018-09-13 10:42:26 +0100
committerGitHub <noreply@github.com>2018-09-13 10:42:26 +0100
commitee3730f9b2e58aaae61e450ca79c3c6c016c829a (patch)
tree1e1c23985537bfbd74b1f40778f9f2d35b1d7888 /driver/main.ml
parentbf9481486f8b79af33a8b87d807e9808893b2ff8 (diff)
downloadocaml-ee3730f9b2e58aaae61e450ca79c3c6c016c829a.tar.gz
Deprecate `ocamlc -vmthread` (#2038)
Diffstat (limited to 'driver/main.ml')
-rw-r--r--driver/main.ml8
1 files changed, 8 insertions, 0 deletions
diff --git a/driver/main.ml b/driver/main.ml
index a81d35651f..3e664f0941 100644
--- a/driver/main.ml
+++ b/driver/main.ml
@@ -142,6 +142,12 @@ module Options = Main_args.Make_bytecomp_options (struct
let anonymous = anonymous
end)
+let vmthread_deprecated_message = "\
+The -vmthread argument of ocamlc is deprecated\n\
+since OCaml 4.08.0. Please switch to system threads, which have the\n\
+same API. Lightweight threads with VM-level scheduling are provided by\n\
+third-party libraries such as Lwt, but with a different API."
+
let main () =
Clflags.add_arguments __LOC__ Options.list;
Clflags.add_arguments __LOC__
@@ -151,6 +157,8 @@ let main () =
readenv ppf Before_args;
Clflags.parse_arguments anonymous usage;
Compmisc.read_color_env ();
+ if !Clflags.use_vmthreads then
+ Location.deprecated Location.none vmthread_deprecated_message;
begin try
Compenv.process_deferred_actions
(ppf,