File: dune

package info (click to toggle)
ocaml-eio 1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,548 kB
  • sloc: ml: 14,608; ansic: 1,237; makefile: 25
file content (39 lines) | stat: -rw-r--r-- 1,513 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
(library
 (name eio_linux)
 (public_name eio_linux)
 (enabled_if ; See https://github.com/ocaml/dune/issues/4895
   (or (= %{system} "linux")          ; Historically, just Linux-x86
       (= %{system} "linux_eabihf")   ; Historically, Linux-arm32
       (= %{system} "linux_elf")      ; Historically, Linux-x86_32
       (= %{system} "elf")))          ; Historically, Linux-ppc64
 (foreign_stubs
  (language c)
  (flags :standard -D_LARGEFILE64_SOURCE)
  (include_dirs ../lib_eio/unix/include)
  (names eio_stubs))
 (libraries eio eio.utils eio.unix uring fmt))

(rule
 (enabled_if
   (and
     %{bin-available:lintcstubs_arity_cmt}
     (or (= %{system} "linux")          ; Historically, just Linux-x86
         (= %{system} "linux_eabihf")   ; Historically, Linux-arm32
         (= %{system} "linux_elf")      ; Historically, Linux-x86_32
         (= %{system} "elf"))))         ; Historically, Linux-ppc64
 (action
  (with-stdout-to
   primitives.h.new
   (run %{bin:lintcstubs_arity_cmt} %{dep:.eio_linux.objs/byte/eio_linux__Low_level.cmt} %{dep:.eio_linux.objs/byte/eio_linux__Sched.cmt}))))

(rule
 (enabled_if
   (and
     %{bin-available:lintcstubs_arity_cmt}
     (or (= %{system} "linux")          ; Historically, just Linux-x86
         (= %{system} "linux_eabihf")   ; Historically, Linux-arm32
         (= %{system} "linux_elf")      ; Historically, Linux-x86_32
         (= %{system} "elf"))))         ; Historically, Linux-ppc64
 (alias runtest)
 (action
  (diff primitives.h primitives.h.new)))