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,7 @@
(executable
(libraries foo)
(name baz))
(alias
(name default)
(action (run ./baz.exe)))

View file

@ -0,0 +1,3 @@
(lang dune 1.11)
(wrapped_executables true)

View file

@ -0,0 +1,2 @@
(* finally calling into library *)
let run () = Bar.run ()

View file

@ -0,0 +1,2 @@
(* directly usable but will cause linking error *)
let run = Foo.run

View file

@ -0,0 +1,3 @@
(library
(name foo)
(wrapped false))

View file

@ -0,0 +1 @@
let run () = print_endline "not directly usable"

View file

@ -0,0 +1,7 @@
These tests show that (wrapped_executables true) addresses the problem of compilation
units of exes colliding with libraries.
The multi module case always requires an alias.
$ dune build
not directly usable