Look for `ARCH_SIXTYFOUR` in both `config.h` and `m.h`.
This commit is contained in:
parent
0d4c1ede99
commit
72a3cb008f
|
@ -113,11 +113,15 @@ let sexp_of_t t =
|
||||||
let compare a b = compare a.name b.name
|
let compare a b = compare a.name b.name
|
||||||
|
|
||||||
let get_arch_sixtyfour stdlib_dir =
|
let get_arch_sixtyfour stdlib_dir =
|
||||||
let config_h = Path.relative stdlib_dir "caml/config.h" in
|
let files = ["caml/config.h"; "caml/m.h"] in
|
||||||
List.exists (Io.lines_of_file (Path.to_string config_h)) ~f:(fun line ->
|
let get_arch_sixtyfour_from file =
|
||||||
match String.extract_blank_separated_words line with
|
let config_h = Path.relative stdlib_dir file in
|
||||||
| ["#define"; "ARCH_SIXTYFOUR"] -> true
|
List.exists (Io.lines_of_file (Path.to_string config_h)) ~f:(fun line ->
|
||||||
| _ -> false)
|
match String.extract_blank_separated_words line with
|
||||||
|
| ["#define"; "ARCH_SIXTYFOUR"] -> true
|
||||||
|
| _ -> false)
|
||||||
|
in
|
||||||
|
List.exists ~f:get_arch_sixtyfour_from files
|
||||||
|
|
||||||
let opam_config_var ~env ~cache var =
|
let opam_config_var ~env ~cache var =
|
||||||
match Hashtbl.find cache var with
|
match Hashtbl.find cache var with
|
||||||
|
|
Loading…
Reference in New Issue