This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,3 @@
let _c = Bigarray.C_layout_typ
let () = Printf.eprintf "Welcome to a\n%!"

View file

@ -0,0 +1,3 @@
(executable
(name a)
(libraries bigarray))

View file

@ -0,0 +1,5 @@
let _c1 = B_lib.v
let _c2 = Bigarray.C_layout_typ
let () = Printf.eprintf "Welcome to b\n%!"

View file

@ -0,0 +1 @@
let v = Bigarray.C_layout_typ

View file

@ -0,0 +1,10 @@
(library
(name b_lib)
(libraries
(re_export bigarray))
(modules b_lib))
(executable
(name b)
(libraries b_lib)
(modules b))

View file

@ -0,0 +1,3 @@
let _c = Bigarray.C_layout_typ
let () = Printf.eprintf "Welcome to c WITH bigarray support\n%!"

View file

@ -0,0 +1 @@
let () = Printf.eprintf "Welcome to c with nothing inferred\n%!"

View file

@ -0,0 +1 @@
let () = Printf.eprintf "Welcome to c WITHOUT bigarray support\n%!"

View file

@ -0,0 +1,9 @@
(executable
(name c)
(libraries
(select
c.ml
from
(!bigarray -> c.nobigarray.ml)
(bigarray -> c.bigarray.ml)
(-> c.dummy.ml))))

View file

@ -0,0 +1,3 @@
let _d = Bigarray.C_layout_typ
let () = Printf.eprintf "Welcome to d WITH bigarray support\n%!"

View file

@ -0,0 +1 @@
let () = Printf.eprintf "Welcome to d with nothing inferred\n%!"

View file

@ -0,0 +1 @@
let () = Printf.eprintf "Welcome to d WITHOUT bigarray support\n%!"

View file

@ -0,0 +1,9 @@
(executable
(name d)
(libraries
(select
d.ml
from
(bigarray -> d.bigarray.ml)
(!bigarray -> d.nobigarray.ml)
(-> d.dummy.ml))))

View file

@ -0,0 +1,3 @@
(lang dune 3.0)
(implicit_transitive_deps false)

View file

@ -0,0 +1,27 @@
This tests the support for the bigarray atom in the dune libraries stanza.
History:
- OCaml 4.08 ([ocaml/ocaml#2263](https://github.com/ocaml/ocaml/pull/2263))
deletes the `map_file` functions completely, requiring _all_ code to be
updated to use `Unix.map_file`, if appropriate. From this release, it is
unnecessary to link with the separate Bigarray library.
- OCaml 5.00 ([ocaml/ocaml#10896](https://github.com/ocaml/ocaml/pull/10896)
removes the separate Bigarray library.
Code may be written which is designed to support both OCaml 4.06 and earlier and
also OCaml 5.0+. In such cases, it is appropriate to have `(libraries bigarray)`
even though there is no Bigarray library in OCaml 5.
This test uses `(libraries bigarray)` (the program uses `Bigarray`)
$ dune exec a/a.exe
Welcome to a
This test uses `(libraries (re_export bigarray))` similarly
$ dune exec b/b.exe
Welcome to b
This test uses a `(select )` construct and should always select bigarray support
$ dune exec c/c.exe
Welcome to c WITH bigarray support
This test uses a `(select )` construct and should always select bigarray
support (the evaluation of `select` order differs from the previous test)
$ dune exec d/d.exe
Welcome to d WITH bigarray support