Fix compatibility for ocaml without Sys.getenv_opt

This commit is contained in:
Rudi Grinberg 2018-04-11 22:37:25 +07:00
parent d65845abb8
commit 22576fac7e
1 changed files with 4 additions and 1 deletions

View File

@ -419,7 +419,10 @@ module Pkg_config = struct
end
let main ?(args=[]) ~name f =
let ocamlc = ref (Sys.getenv_opt "DUNE_CONFIGURATOR") in
let ocamlc = ref (
match Sys.getenv "DUNE_CONFIGURATOR" with
| s -> Some s
| exception Not_found -> None) in
let verbose = ref false in
let dest_dir = ref None in
let args =