Skip to content

Commit

Permalink
Add compilation target globals to OpamInitDefaults
Browse files Browse the repository at this point in the history
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
  • Loading branch information
dra27 committed May 10, 2017
1 parent a8262d3 commit 36a7b38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/client/opamInitDefaults.ml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ let eval_variables = [
"Host architecture, as returned by 'uname -m'";
OpamVariable.of_string "sys-ocaml-version", ["ocamlc"; "-vnum"],
"OCaml version present on your system independently of opam, if any";
OpamVariable.of_string "sys-ocaml-arch", ["sh"; "-c"; "ocamlc -config | tr -d '\r' | grep '^architecture: ' | sed -e 's/.*: //' -e 's/i386/i686/' -e 's/amd64/x86_64/'"],
"Target architecture of the OCaml compiler present on your system";
OpamVariable.of_string "sys-ocaml-cc", ["sh"; "-c"; "ocamlc -config | tr -d '\r' | grep '^ccomp_type: ' | sed -e 's/.*: //'"],
"Host C Compiler type of the OCaml compiler present on your system";
OpamVariable.of_string "sys-ocaml-libc", ["sh"; "-c"; "ocamlc -config | tr -d '\r' | grep '^os_type: ' | sed -e 's/.*: //' -e 's/Win32/msvc/' -e '/^msvc$/!s/.*/libc/'"],
"Host C Runtime Library type of the OCaml compiler present on your system";
]

let switch_variables =
Expand Down

0 comments on commit 36a7b38

Please sign in to comment.