|
22 | 22 | ))
|
23 | 23 | (ocamlopt_flags (:include %{project_root}/ocamlopt_flags.sexp))
|
24 | 24 | (library_flags (:standard -linkall))
|
| 25 | + ; UnixLabels is compiled separately as it needs the -nolabels flag. We can't |
| 26 | + ; currently use an attribute in the .ml file to enable this behaviour as |
| 27 | + ; the system compiler used to build the boot compiler won't understand it. |
| 28 | + (modules (:standard \ unixLabels)) |
25 | 29 | (foreign_stubs (language c) (names
|
26 | 30 | accept access addrofstr alarm bind channels chdir chmod chown chroot close
|
27 | 31 | fsync closedir connect cst2constr cstringv dup dup2 envir errmsg execv execve
|
|
39 | 43 | (:include %{project_root}/oc_cppflags.sexp)))
|
40 | 44 | ))
|
41 | 45 |
|
| 46 | +(library |
| 47 | + (name unixlabels) |
| 48 | + (libraries unix) |
| 49 | + (wrapped false) |
| 50 | + (modes byte native) |
| 51 | + (flags ( |
| 52 | + -absname -w +a-4-9-41-42-44-45-48 -warn-error A -bin-annot |
| 53 | + -g -safe-string -strict-sequence -strict-formats -nolabels |
| 54 | + )) |
| 55 | + (ocamlopt_flags (:include %{project_root}/ocamlopt_flags.sexp)) |
| 56 | + (modules unixLabels) |
| 57 | +) |
| 58 | + |
| 59 | +(rule |
| 60 | + (targets unix_merged.a) |
| 61 | + (action |
| 62 | + (run |
| 63 | + %{dep:../../../tools/merge_dot_a_files.sh} |
| 64 | + %{targets} |
| 65 | + %{dep:unix.a} |
| 66 | + %{dep:unixlabels.a}))) |
| 67 | + |
| 68 | +(rule |
| 69 | + (targets unix_merged.cma) |
| 70 | + (action |
| 71 | + (run |
| 72 | + %{dep:../../../tools/merge_archives.exe} |
| 73 | + %{targets} |
| 74 | + %{dep:unix.cma} |
| 75 | + %{dep:unixlabels.cma}))) |
| 76 | + |
| 77 | +(rule |
| 78 | + (targets unix_merged.cmxa) |
| 79 | + (action |
| 80 | + (run |
| 81 | + %{dep:../../../tools/merge_archives.exe} |
| 82 | + %{targets} |
| 83 | + %{dep:unix.cmxa} |
| 84 | + %{dep:unixlabels.cmxa}))) |
| 85 | + |
42 | 86 | (install
|
43 | 87 | (files
|
44 | 88 | .unix.objs/native/unix.cmx
|
45 |
| - .unix.objs/native/unixLabels.cmx |
46 |
| - unix.cmxa |
47 |
| - unix.a |
48 |
| - unix.cma |
| 89 | + .unixlabels.objs/native/unixLabels.cmx |
| 90 | + (unix_merged.cmxa as unix.cmxa) |
| 91 | + (unix_merged.a as unix.a) |
| 92 | + (unix_merged.cma as unix.cma) |
49 | 93 | .unix.objs/byte/unix.cmi
|
50 | 94 | .unix.objs/byte/unix.cmti
|
51 |
| - .unix.objs/byte/unixLabels.cmi |
52 |
| - .unix.objs/byte/unixLabels.cmti |
| 95 | + .unixlabels.objs/byte/unixLabels.cmi |
| 96 | + .unixlabels.objs/byte/unixLabels.cmti |
| 97 | + ; For the moment unix.cmxs does not include UnixLabels. |
53 | 98 | unix.cmxs
|
54 | 99 | unix.mli
|
55 | 100 | unixLabels.mli
|
|
0 commit comments