Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[build] fix unix compilation by explicitly including ocaml system hea…

…ders via a tag (and not for the xen build)
  • Loading branch information...
commit 854c81d90b4eac2ad62eeb3683bd6b7dd5118602 1 parent a4a1b2f
@avsm authored
Showing with 5 additions and 2 deletions.
  1. +4 −0 lib/myocamlbuild.ml
  2. +1 −2  lib/os/runtime_unix/_tags
View
4 lib/myocamlbuild.ml
@@ -120,6 +120,9 @@ module CC = struct
A "-DCAML_NAME_SPACE"; A "-DNATIVE_CODE"; A "-DTARGET_amd64"; A "-DSYS_xen";
A (ps "-I%s/os/runtime_xen/ocaml" Pathname.pwd) ] @ ocaml_debug_inc
+ (* ocaml system include directory i.e. /usr/lib/ocaml *)
+ let ocaml_sys_incs = [ A"-I"; Px (Util.run_and_read "ocamlc -where"); ]
+
(* dietlibc bits, mostly extra warnings *)
let dietlibc_incs = [
A "-Wextra"; A "-Wchar-subscripts"; A "-Wmissing-prototypes";
@@ -277,6 +280,7 @@ let _ = dispatch begin function
flag ["c"; "compile"; "include_xen"] & S CC.xen_incs;
flag ["c"; "compile"; "include_libm"] & S CC.libm_incs;
flag ["c"; "compile"; "include_ocaml"] & S CC.ocaml_incs;
+ flag ["c"; "compile"; "include_system_ocaml"] & S CC.ocaml_sys_incs;
flag ["c"; "compile"; "include_dietlibc"] & S CC.dietlibc_incs;
flag ["c"; "compile"; "pic"] & S [A"-fPIC"];
View
3  lib/os/runtime_unix/_tags
@@ -1,2 +1 @@
-<*.c>: include_libev,pic,unix_header
-<*_stubs.c>: include_ocaml
+<*.c>: include_libev,pic,unix_header,include_system_ocaml
Please sign in to comment.
Something went wrong with that request. Please try again.