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,4 @@
(executable
(name print_version)
(modes exe byte)
(libraries build_info))

View file

@ -0,0 +1,4 @@
let () =
(match Build_info.Build_info_data.version with
| None -> print_endline "<version missing>"
| Some version -> print_endline version)

View file

@ -0,0 +1,4 @@
(executable
(name toto)
(modes exe byte)
(public_name toto))

View file

@ -0,0 +1 @@
print_endline "Hello, world!"

View file

@ -0,0 +1,5 @@
(* The implementation of this module is generated by dune when linking an
executable *)
val version : string option
val statically_linked_libraries : (string * string option) list

View file

@ -0,0 +1,7 @@
(library
(name build_info)
(modules_without_implementation build_info_data)
(special_builtin_support
(build_info
(data_module build_info_data)
(api_version 1))))

View file

@ -0,0 +1,3 @@
(executable
(name foo)
(modes native))

View file

@ -0,0 +1,3 @@
#!/bin/sh
export PATH="$ORIG_PATH"
exec ocamlc "$@"

View file

@ -0,0 +1,3 @@
#!/bin/sh
export PATH="$ORIG_PATH"
exec ocamldep "$@"

View file

@ -0,0 +1,3 @@
#!/bin/sh
export PATH="$ORIG_PATH"
exec ocamlmklib "$@"

View file

@ -0,0 +1,9 @@
$ env ORIG_PATH="$PATH" PATH="$PWD/ocaml-bin:$PATH" dune build @all
$ _build/default/bin-with-build-info/print_version.exe
<version missing>
Check that building a native only executable fails
$ env ORIG_PATH="$PATH" PATH="$PWD/ocaml-bin:$PATH" dune build native-only/foo.exe
Error: Don't know how to build native-only/foo.exe
[1]

View file

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