From 5aa55e0fc8e0b05f2bc0e9ae6c688d09ee450c46 Mon Sep 17 00:00:00 2001 From: Xavier Clerc Date: Mon, 8 Aug 2011 09:39:10 +0000 Subject: [PATCH] PR#5330: thread tag with '.top' and '.inferred.mli' targets git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11169 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- Changes | 1 + ocamlbuild/ocaml_specific.ml | 4 +++- ocamlbuild/ocaml_tools.ml | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 502de6eaa..aa4dd0637 100644 --- a/Changes +++ b/Changes @@ -30,6 +30,7 @@ Standard library: Bug Fixes: - PR#5322: type abbreviations expanding to a universal type variable +- PR#5330: thread tag with '.top' and '.inferred.mli' targets OCaml 3.12.1: ---------------------- diff --git a/ocamlbuild/ocaml_specific.ml b/ocamlbuild/ocaml_specific.ml index 1b830addb..454daaed4 100644 --- a/ocamlbuild/ocaml_specific.ml +++ b/ocamlbuild/ocaml_specific.ml @@ -527,7 +527,9 @@ flag ["ocaml"; "compile"; "thread"] (A "-thread");; if not !Options.use_ocamlfind then begin flag ["ocaml"; "doc"; "thread"] (S[A"-I"; A"+threads"]); flag ["ocaml"; "link"; "thread"; "native"; "program"] (S[A "threads.cmxa"; A "-thread"]); - flag ["ocaml"; "link"; "thread"; "byte"; "program"] (S[A "threads.cma"; A "-thread"]) + flag ["ocaml"; "link"; "thread"; "byte"; "program"] (S[A "threads.cma"; A "-thread"]); + flag ["ocaml"; "link"; "thread"; "native"; "toplevel"] (S[A "threads.cmxa"; A "-thread"]); + flag ["ocaml"; "link"; "thread"; "byte"; "toplevel"] (S[A "threads.cma"; A "-thread"]) end else begin flag ["ocaml"; "link"; "thread"; "program"] (A "-thread") end;; diff --git a/ocamlbuild/ocaml_tools.ml b/ocamlbuild/ocaml_tools.ml index 1381ca465..f68aff42a 100644 --- a/ocamlbuild/ocaml_tools.ml +++ b/ocamlbuild/ocaml_tools.ml @@ -93,6 +93,7 @@ let infer_interface ml mli env build = let tags = tags_of_pathname ml++"ocaml" in Ocaml_compiler.prepare_compile build ml; Cmd(S[!Options.ocamlc; ocaml_ppflags tags; ocaml_include_flags ml; A"-i"; + (if Tags.mem "thread" tags then A"-thread" else N); T(tags++"infer_interface"); P ml; Sh">"; Px mli]) let menhir mly env build =