Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MSVC build for 4.07-4.09 #12

Merged
1 commit merged into from
Oct 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,17 @@ let modules_post_4_02 =
]

let missing_modules =
List.filter modules_post_4_02 ~f:(fun (_, v) -> version < v)
|> List.map ~f:fst
let missing =
List.filter modules_post_4_02 ~f:(fun (_, v) -> version < v)
|> List.map ~f:fst
in
(* For OCaml 4.07-4.09 incl. this solves the problem of being unable to
generate empty .cmxa files on MSVC by duplicating the Pervasives module
(and updating its deprecation warning not to refer to this library! *)
if version < (4, 10) && version >= (4, 7) then
"Pervasives"::missing
else
missing

let all_modules_except_stdlib =
(modules_in_4_02 @ List.map modules_post_4_02 ~f:fst)
Expand Down
5 changes: 5 additions & 0 deletions src/pervasives.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[@@@ocaml.deprecated "Use Stdlib instead."]

[@@@ocaml.warning "-3"]

include Stdlib.Pervasives