Skip to content
Success

Changes

Summary

  1. Dynamic matrix for the others job (details)
  2. Add optional static and mimimal jobs (details)
  3. Merge macOS Dependency steps (details)
  4. Fix test_create_cursor_failures.ml on Cygwin (details)
  5. Update build-msvc.yml to permit Cygwin builds (details)
  6. Add optional Cygwin check to CI (details)
  7. Add bytecode-only Cygwin check (details)
  8. Add a 'CI: Skip testsuite' label (details)
  9. Fix tools/check-symbol-names for i686 mingw-w64 (details)
  10. Ensure AppVeyor runs for PRs on these branches (details)
  11. Don't fail-fast (details)
  12. Test the Unix executable header in CI (details)
  13. Use Cygwin 3.6.0 on AppVeyor (details)
  14. Hold GNU parallel at 20241222 on AppVeyor (details)
  15. Fix AppVeyor for 32-bit platforms (details)
  16. Fix corrupt caching of GNU parallel (details)
  17. Set FLEXDIR when bootstrapping flexlink (details)
  18. Add caml_sys_proc_self_exe primitive (details)
  19. Add Sys.runtime_executable (details)
  20. Add Compmisc.reinit_path (details)
  21. Add Dll.search_path (details)
  22. Add Misc.Stdlib.String.to_utf_8_seq (details)
  23. Expose Bytelink.read_runtime_launch_info (details)
  24. Add Config.as_is_cc (details)
  25. Add Config.c_compiler_vendor (details)
  26. Add a test for the compiler "in-prefix" (details)
  27. WIP: relocation test (details)
  28. Pull in enable-relative parts (details)
  29. Hacking in strategy rather than runtime (details)
  30. Plumb the in-prefix tests into CI (details)
  31. WIP: testsuite off in precheck (details)
  32. WIP (details)
  33. Fix red text on Windows! (details)
  34. more (details)
  35. More (details)
  36. Parts from runtime-searching (details)
  37. yellow (details)
  38. ocamlrun (details)
  39. oops (details)
  40. more (details)
  41. libdir (details)
  42. Refactor ld.conf test for easier merging (details)
  43. clarify (details)
  44. more (details)
  45. reprodicible (details)
  46. riscv64 has similarly trouble to s390x (details)
  47. WIP: deal with exit 139 (details)
  48. reproducible for bytecode-only (details)
  49. More bits (details)
  50. libdir mark 2 (details)
  51. tidy (details)
  52. more tidy (details)
  53. more tidy (details)
  54. more tidy (details)
  55. more correctly tidied (details)
  56. riscv (details)
  57. libdir mark 6002 (details)
  58. Add --with-stublibs configure option (details)
  59. Don't add a double-separator when locating ld.conf (details)
  60. ld.conf-relative path interpretation (details)
  61. Generate ld.conf using relative paths (details)
  62. Load ld.conf from all possible places (details)
  63. Remove caml_get_stdlib_location (details)
  64. Harden the parsing of ld.conf w.r.t. load and CRLF (details)
  65. Use caml_parse_ld_conf in ocamlc (details)
  66. Tidy installation of static builds (details)
  67. Fix the detection of Cygwin-like build environments (details)
  68. Preserve backslashes in --prefix (details)
  69. Harden startup of -custom executables (details)
  70. Interpret . in runtime-launch-info (details)
  71. Add --with-relative-libdir configure option (details)
  72. Add caml_standard_library_default to the runtime (details)
  73. Add -set-runtime-default (details)
  74. Add %standard_library_default (details)
  75. Bootstrap (details)
  76. Use %standard_library_default in Config (details)
  77. Allow libdir to be found relative to bindir (details)
  78. Update the installation test for enable-relative (details)
  79. Test --with-relative-libdir in CI (details)
  80. NFPR: fully test --with-relative-libdir in precheck (details)
  81. Use as directly on Cygwin, as on Linux (details)
  82. Detect but ignore -fdebug-prefix-map on mingw-w64 (details)
  83. Increase reproducibility of relative artefacts (details)
  84. Typo in stdlib/Makefile (details)
  85. Reduce tmpheader.exe to 4-5KiB on Windows (details)
  86. Stop using Caml_inline and Camlnoret in headernt.c (details)
  87. Remove unnecessary guards around unistd.h (details)
  88. Use PATH_MAX instead of MAXPATHLEN (details)
  89. Assume S_ISREG and SEEK_END (details)
  90. Move O_BINARY definition to "header" section (details)
  91. Make caml/exec.h independent (details)
  92. Re-order some header functions (no-op) (details)
  93. Share error path in headernt.c (details)
  94. Unify implementation of read_size (details)
  95. headernt.c: inline run_runtime into main (details)
  96. Check for errors from lseek in header.c (details)
  97. Refactor error display code (details)
  98. header.c: close bytecode image before exec (details)
  99. Tweak the signature of read_runtime_path (details)
  100. Use execvp in header.c (as in headernt.c) (details)
  101. headernt: make read_runtime_path more CRTish (details)
  102. Missing error case in headernt.c (details)
  103. Unify the common parts of header.c and headernt.c (details)
  104. Merge stdlib/header{,nt}.c (details)
  105. Add -launch-method to ocamlc (details)
  106. Test both bytecode header methods (details)
  107. Determine RuntimeID values in configure (details)
  108. Put Bytecode RuntimeID in runtime-launch-info (details)
  109. Bootstrap (details)
  110. Mangle the bytecode runtime names (details)
  111. Build suffixed shared runtimes (details)
  112. Add Zinc RuntimeID Mask for portability (details)
  113. Compute the Zinc runtime ID in the linker (details)
  114. Bootstrap (details)
  115. Remove Bytecode RuntimeID in runtime-launch-info (details)
  116. Add runtime suffixes to bytecode stub libraries (details)
  117. Make Windows header absolute (as on Unix) (details)
  118. Add -runtime-search to ocamlc (details)
  119. Tweak the type (details)
  120. Add --enable-runtime-search[-target] options (details)
  121. Update the installation test for camlheader-search (details)
  122. Use Config instead of runtime-launch-info (details)
  123. Update the test (details)
  124. Test --enable-runtime-search in CI (details)
  125. Compute the Zinc runtime ID (details)
  126. Bootstrap (details)
  127. NFPR: fully test --enable-runtime-search in precheck (details)
  128. Move caml_search_dll_in_path to dynlink.c (details)
  129. header.c: remove unnecessary Cygwin workaround (details)
  130. Remove caml_cds_file (details)
  131. Simplify the interface of caml_attempt_open (details)
  132. header.c: handle parasitic case of argc < 1 (details)
  133. header.c: malloc the result of searchpath (details)
  134. Move searchpath from header.c into the runtime (details)
  135. Use caml_executable_name in header.c (details)
  136. Don't check for shebang scripts on Windows (details)
  137. Preserve argv[0] on Unix in the executable header (details)
  138. Harden the cloexec.ml test on Windows (details)
  139. Possible alternate approach... (details)
  140. ... and the bug-fix which goes with it (details)
  141. Fix STARTUPINFO structure in stdlib/header.c (details)
  142. Share image fd between header.c and startup_byt.c (details)
  143. Add comments on the handling of blank env vars (details)
  144. Ignore empty TMPDIR in the Filename module (details)
  145. Ignore empty TMPDIR in ocamlyacc (details)
  146. Propagate non-empty tmpdir in ocamlyacc (details)
  147. Ignore CAML_DEBUG_FILE if it's "Set But Null" (details)
  148. Ignore OCAMLPROF_DUMP if it's "Set But Null" (details)
  149. Use non-raising Sys.getenv_opt in win32unix (details)
  150. Ignore empty strings in Compmisc.set_from_env (details)
  151. Ignore empty environment variables in ocamltest (details)
  152. Ignore empty MAKE variable in ocamltest (details)
  153. Treat OCAML_BINANNOT_WITHENV as unset when empty (details)
  154. Harden processing of SOURCE_DATE_EPOCH in ocamldoc (details)
  155. Add some limited information about CAMLSIGPIPE (details)
  156. Ignore empty OCAML_RUNTIME_EVENTS_ variables (details)
  157. Ignore blank OCAMRUNPARAM, OCAMLLIB and CAMLLIB (details)
  158. Ignore empty components in PATH-like things (details)
  159. Fix C library options for win32unix (details)
  160. Build and install threads.cmxs (details)
  161. Fix inclusion of libraries when partial linking (details)
  162. Use entrypoint flexdll branch (details)
  163. Revert "accept unknown options" (details)
  164. Stop installing and documenting config_main, etc. (details)
  165. Use clang-cl for flexdll support objects (details)
  166. Add %shared_libraries primitive (details)
  167. Bootstrap (details)
  168. Improve the "dynamic loading not supported" error (details)
  169. Free tables after handing off to Dynlink (details)
  170. Move print_magic and print_config out of caml_params (details)
  171. Preserve option R in caml_runtime_parameters (details)
  172. Swap the V and v in caml_runtime_parameters (details)
  173. Add -set-runtime-default to the compilers (details)
  174. Test -set-runtime-default in test-in-prefix (details)
  175. Re-order initialisations in bytecode (details)
  176. Support c=1 mode in ocamlrun (details)
Commit 6098e7f0b7a9535d97e3b3d128b348a0676f0640 by david.allsopp
Dynamic matrix for the others job

Define the matrix for the others job using an actions/github-script
step, which allows the possibility of the matrix being dynamic.
The file was modified.github/workflows/build.yml
Commit 86363fdf3c408f825aa62abb015447305dfb793e by david.allsopp
Add optional static and mimimal jobs

Tests a full `--disable-shared` build on Linux and also a Linux build
with as many options disabled as possible (as the minimal build in the
other-configs job on Jenkins also does).

The matrix is expanded by adding the 'CI: Full matrix' label to a pull
request.
The file was modified.github/workflows/build.yml
Commit 6ef3ba2e9dac904f2c54e7979e573cbfdff6d64c by david.allsopp
Merge macOS Dependency steps
The file was modified.github/workflows/build.yml
Commit 52c61d8f9ed1975bdda6294e7d543638c4e3e3e0 by david.allsopp
Fix test_create_cursor_failures.ml on Cygwin

If Cygwin is running "elevated" - which it is in CI - then it acts as
though it's running as root. It intentionally activates
SeBackupPrivilege, which thwarts the test_create_cursor_failures.ml
test.

The OCaml testsuite will never require root privileges for anything
meaningful, so ocamltest on Cygwin simply drops the SeBackupPrivilege
when running on Cygwin, which means the test correctly fails.
The file was modifiedocamltest/run_command.ml
The file was modifiedocamltest/run_stubs.c
Commit 16c47f02bcf6277ad417928813533da3dc66e76d by david.allsopp
Update build-msvc.yml to permit Cygwin builds

Yes, yes, the filename -msvc.yml has become a bit of date...
The file was modified.github/workflows/build-msvc.yml
Commit 09932d5096afc90285c28048921af9009999b7e0 by david.allsopp
Add optional Cygwin check to CI
The file was modified.github/workflows/build-msvc.yml
Commit fd5e267f25610195c7383004c631c1d7e1da9377 by david.allsopp
Add bytecode-only Cygwin check
The file was modified.github/workflows/build-msvc.yml
Commit 9aa37a9aa0afd9535c6e8e77d2ed92433c6e9920 by david.allsopp
Add a 'CI: Skip testsuite' label

Applying this label _before_ the testsuite has started in either GitHub
Actions or AppVeyor will cause the execution of the testsuite to be
skipped.
The file was modified.github/workflows/build.yml
The file was modified.github/workflows/build-msvc.yml
The file was modifiedtools/ci/appveyor/appveyor_build.sh
Commit 59b3a98199ec46595a7ca4396ceb7b6a776dfe29 by david.allsopp
Fix tools/check-symbol-names for i686 mingw-w64
The file was modifiedtools/check-symbol-names
Commit 3baa2f43a5dafeb452d27f7a560e11fd53fe8386 by david.allsopp
Ensure AppVeyor runs for PRs on these branches
The file was modifiedappveyor.yml
Commit 7faf9aa47b4d0ce365cd402c13d076f101ab4b70 by david.allsopp
Don't fail-fast
The file was modified.github/workflows/build.yml
The file was modified.github/workflows/build-msvc.yml
The file was modifiedappveyor.yml
Commit 52fd524356739c992f611e39cb6af92f7c354f34 by david.allsopp
Test the Unix executable header in CI
The file was modified.github/workflows/build.yml
The file was modified.github/workflows/build-msvc.yml
Commit a328cb3627b7a1d9b4107da4f3f589c23b509357 by david.allsopp
Use Cygwin 3.6.0 on AppVeyor
The file was modifiedtools/ci/appveyor/appveyor_build.cmd
Commit f43c8340d259b82574eafede0a652a11a6bed42c by david.allsopp
Hold GNU parallel at 20241222 on AppVeyor

Avoids the irritating addition of PWD to the sanitisation checks.
The file was modifiedtools/ci/appveyor/appveyor_build.sh
Commit d7dff43e90e14ee8c30c28dc9fb71356585dc153 by david.allsopp
Fix AppVeyor for 32-bit platforms
The file was modifiedtools/ci/appveyor/appveyor_build.sh
Commit 616d2be1309c0abbe459240a363aceb23bb41e3e by david.allsopp
Fix corrupt caching of GNU parallel
The file was modifiedtools/ci/appveyor/appveyor_build.sh
Commit b6385e306d5433690a3fefe4cf8941b6c285fa6a by david.allsopp
Set FLEXDIR when bootstrapping flexlink

Previously, the flexdll support objects were placed in both byte/bin and
opt/bin with the copy of flexlink.exe when flexlink was being
bootstrapped with OCaml. The objects are small, so the copying was not
particulary onerous.

However, if opt/bin/flexlink.exe is a native Windows symlink (pointing
to ../../flexlink.opt.exe) then Sys.executable_name when flexlink runs
will point to the wrong place. While flexlink ought to be checking
Sys.argv.(0) rather than Sys.executable_name, a better hardening is to
be explicit and set the FLEXDIR environment variable to point to the
directory containing the support objects. This also allows
byte/bin/flexlink.exe and opt/bin/flexlink.exe to share the same copy of
the objects.
The file was modifiedMakefile.common
The file was modifiedMakefile.cross
The file was modifiedMakefile
The file was modifiedMakefile.build_config.in
Commit af1a56c42810b68d70bbb4492cb51dbcc23e7bfd by david.allsopp
Add caml_sys_proc_self_exe primitive

caml_executable_name is always called in native startup and for all the
non-default bytecode linking mechanisms. Bytecode startup now always
calls caml_executable_name, and this value is stored along with
exe_name.

caml_sys_proc_self_exe returns this stored value as a string option. It
returns None if caml_executable_name is not implemented on a given
platform.
The file was modifiedruntime/sys.c
The file was modifiedruntime/caml/sys.h
The file was modifiedruntime/startup_byt.c
The file was modifiedruntime/caml/startup_aux.h
The file was modifiedruntime/startup_nat.c
The file was modifiedruntime/startup_aux.c
Commit b5e685f1da25998f8f156c264e7c93636acd0b07 by david.allsopp
Add Sys.runtime_executable

In native mode, same as Sys.executable_name, in bytecode, the path to
the interpreter executing Sys.executable_name, which may not be the same
from the same file.
The file was modifiedstdlib/sys.ml.in
The file was modifiedstdlib/sys.mli
Commit 2ceaa6347963949c4da4d230e27f8557100a1b41 by david.allsopp
Add Compmisc.reinit_path

Compmisc.init_path initialises the load path using
Config.standard_library. Compmisc.reinit_path generalises this, allowing
an alternate value for the standard library location to be used. This is
used internally when testing compiler installations in order to allow
Ccomp.call_linker to be used.
The file was modifieddriver/compmisc.mli
The file was modifieddriver/compmisc.ml
Commit e4b6f2757976266656a6c9dd442411aee5e98530 by david.allsopp
Add Dll.search_path

Provides a copy of the DLL search path for the test harness.
The file was modifiedbytecomp/dll.ml
The file was modifiedbytecomp/dll.mli
Commit ec14f1b26d25aec8da91d64dd5c6eb10471f06c0 by david.allsopp
Add Misc.Stdlib.String.to_utf_8_seq
The file was modifiedutils/misc.ml
The file was modifiedutils/misc.mli
Commit f7c7308f6ed6f325e404b252e3eb3e1b8c7c3a23 by david.allsopp
Expose Bytelink.read_runtime_launch_info
The file was modifiedbytecomp/bytelink.mli
Commit d34846049965dca304c77ac73d053954f966be3b by david.allsopp
Add Config.as_is_cc

Indication as to whether ocamlopt assembles files via the C compiler or
by calling the assembler directly.
The file was modifiedconfigure
The file was modifiedconfigure.ac
The file was modifiedutils/config.mli
The file was modifiedutils/config.generated.ml.in
The file was modifiedutils/config.fixed.ml
Commit e355f7cdfcc5f57ebd36e94d0f5601f41a50e66a by david.allsopp
Add Config.c_compiler_vendor

Expose the ocaml_cc_vendor variable computed in aclocal.m4
The file was modifiedutils/config.generated.ml.in
The file was modifiedutils/config.mli
The file was modifiedconfigure.ac
The file was modifiedutils/config.fixed.ml
The file was modifiedaclocal.m4
The file was modifiedconfigure
Commit 7fc950072de5cf3145fafb49a3df8be95c2b5119 by david.allsopp
Add a test for the compiler "in-prefix"
The file was modified.depend
The file was modifiedconfigure
The file was addedtestsuite/tools/main_in_c.c
The file was addedtestsuite/in_prefix/Makefile.test
The file was modified.gitignore
The file was addedtestsuite/in_prefix/README.md
The file was modifiedMakefile
The file was modifiedconfigure.ac
The file was addedtestsuite/tools/test_in_prefix.ml
The file was addedtestsuite/tools/test_in_prefix.mli
Commit 1e37e40bbf505d61b844f980eed117e8c9996a83 by david.allsopp
WIP: relocation test
The file was modifiedtestsuite/in_prefix/Makefile.test
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modified.depend
The file was modifiedMakefile.build_config.in
Commit d227a02ffa9713d9cbcc55b618f75c3ca6f8caad by david.allsopp
Pull in enable-relative parts
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit c1ffe2f09e044735fa88ccf6f3044937695264c0 by david.allsopp
Hacking in strategy rather than runtime
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 59c3eea33b0273d1fa3e3cf49783a860940ae3aa by david.allsopp
Plumb the in-prefix tests into CI
The file was modifiedtools/ci/appveyor/appveyor_build.sh
The file was modified.github/workflows/build.yml
The file was modified.github/workflows/build-msvc.yml
The file was modifiedtools/ci/actions/runner.sh
The file was modifiedtools/ci/inria/main
Commit c24ff09f5062cdd7a2f943908faa419c2b4037c2 by david.allsopp
WIP: testsuite off in precheck
The file was modifiedtools/ci/inria/main
Commit 896fdac916603fc0d39519f55f904b2eecb66d00 by david.allsopp
WIP
The file was modifiedMakefile
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 44ea8062a6f3fbf2a57763b6ddb4a38dff5316ce by david.allsopp
Fix red text on Windows!
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit ab06f55e08286e1888463581039ec9e658612104 by david.allsopp
more
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 4798f27a543326565797f323d84082d06654845f by david.allsopp
More
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit f41fa870ef52ef927e8818abd922285852da0ba1 by david.allsopp
Parts from runtime-searching
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 4be0c9cfe5a055eecd7200f991ceec346acf7cb8 by david.allsopp
yellow
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 1dfa1f875bdeb7af49faf329e2c30a3559216c3d by david.allsopp
ocamlrun
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit af7eb14e7eb18a4242e2d388af079834e2e06404 by david.allsopp
oops
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 7017c21ccc79df0831435c3999400e96f2554186 by david.allsopp
more
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit dddc127eb9157a391443a5c34b345bce638bb490 by david.allsopp
libdir
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 18c70d2ecaf7a469b0ceb52b33c63d23a81aabe9 by david.allsopp
Refactor ld.conf test for easier merging
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit af6555f9c71925c3c795b0b44681a9ce568a6b17 by david.allsopp
clarify
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit f1de111d51cfcbbd6dcebde71446f689d8c4d1a0 by david.allsopp
more
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 47e13690c8cc709b2a1f1d7f799e4a929ecdf96a by david.allsopp
reprodicible
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit f66b16f3dddf7083c3132acb7b439bee3364ec96 by david.allsopp
riscv64 has similarly trouble to s390x
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 1b3dd13cbd41c4125f72ae344e51121dd34fab0b by david.allsopp
WIP: deal with exit 139

Can't be right to do this unconditionally - perhaps fails needs to
become three-state?
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 0f09b3c1672cfa1300d877b40d20159e4b5cab81 by david.allsopp
reproducible for bytecode-only
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 0baf0725a5c1b92ea5ed0464e064d7f4629a02d4 by david.allsopp
More bits
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit a547e2a61fc5c71524f1712b6bd465989c4c2dad by david.allsopp
libdir mark 2
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit b797521018cfefa9080d313afa8e4c8a47a186dc by david.allsopp
tidy
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit e294852dcd80299b4204f6ce00ab04fe29cd44fe by david.allsopp
more tidy
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 0b8cdb7d12a49e0043ad52c6c32bbb7f21cbad9b by david.allsopp
more tidy
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 09fbe8ea1ebc93b38a993959495ce6e3b73efe1e by david.allsopp
more tidy
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 3ce0d6bab29aeda1f3b623e3f13a38bd18ff62a3 by david.allsopp
more correctly tidied
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit d9431e0425f0b0747322c49c7de5ecece4a81640 by david.allsopp
riscv
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 782b371a7b1b067f274c5faa29cd7a8ff3d480fc by david.allsopp
libdir mark 6002
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit e297f8b64e433c8f1e644f58c6b32d965085d559 by david.allsopp
Add --with-stublibs configure option

--with-stublibs is intended for use in opam and allows an additional
directory to be added at the top of $(ocamlc -where)/ld.conf.
The file was modifiedocaml-variants.opam
The file was modifiedMakefile
The file was modifiedconfigure.ac
The file was modifiedconfigure
Commit 15351eef5632e81f12f87856ca7f0f4567861ac6 by david.allsopp
Don't add a double-separator when locating ld.conf

When calculating the full path for ld.conf, the runtime unconditionally
concatenated "/ld.conf". This is harmless when the separators appear in
the middle of a path ("/usr/local/lib/ocaml//ld.conf" is equivalent to
the version with only single slashes), but it is technically incorrect
for two corners cases with OCAMLLIB and CAMLLIB:

- if either is explicitly set to "/" then "//ld.conf" is _not_ the same
  file as "/ld.conf". This is mildly relevant on Windows and Cygwin
  where the two initial slashes (including as "\/" for native Windows)
  will be interpreted as a UNC path
- if either is explicitly blank, then "ld.conf" (i.e. ld.conf in the
  current directory) is a less illogical file to open than "/ld.conf"
The file was modifiedruntime/dynlink.c
The file was modifiedruntime/caml/osdeps.h
Commit 1bc2bf998e448d7469c63b70559c68bbaac5db47 by david.allsopp
ld.conf-relative path interpretation

Explicit relative paths in ld.conf are now interpreted relative to the
directory containing ld.conf.
The file was modifiedruntime/dynlink.c
The file was modifiedruntime/caml/osdeps.h
The file was modifiedbytecomp/dll.ml
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit ea51d156b928bb3ced73b339fceeb15447691da5 by david.allsopp
Generate ld.conf using relative paths
The file was modifiedtestsuite/in_prefix/README.md
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedconfigure
The file was modifiedconfigure.ac
The file was modifiedocaml-variants.opam
Commit 9bb422933d5d386a03a9ff82d5aef6dcae783f68 by david.allsopp
Load ld.conf from all possible places

Before, the first ld.conf found from $OCAMLLIB, $CAMLLIB or the
preconfigured standard library location was loaded. Now all of these
are loaded.
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedruntime/dynlink.c
The file was modifiedruntime/caml/dynlink.h
The file was modifiedutils/config.mli
The file was modifiedmanual/src/cmds/runtime.etex
The file was modifiedbytecomp/dll.ml
Commit d4ce80ae70e33f1face2b838eb69f27fef86a5b3 by david.allsopp
Remove caml_get_stdlib_location

The function was only ever added to share the logic between dynlink.c
and startup_byt.c - now that dynlink.c doesn't require it, move the
function to startup_byt.c and make it internal again.
The file was modifiedruntime/dynlink.c
The file was modifiedruntime/caml/dynlink.h
The file was modifiedruntime/startup_byt.c
Commit cc64326ed79ed6b447ff66f40a207561521b00ac by david.allsopp
Harden the parsing of ld.conf w.r.t. load and CRLF
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedbytecomp/dll.ml
The file was modifiedruntime/dynlink.c
Commit de200ad3d47668e788e3f96b4e26dbb6e2db6ea7 by david.allsopp
Use caml_parse_ld_conf in ocamlc

Eliminate the need for two implementations of the parsing logic for
ld.conf by sharing the C implementation (which must exist, since it's
part of bytecode startup) with the bytecode compiler, replacing
Dll.ld_conf_contents
The file was modifiedbytecomp/dll.ml
The file was modifiedruntime/dynlink.c
The file was modifiedruntime/startup_byt.c
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedruntime/caml/dynlink.h
Commit 70b63dea20925ff30db198ad9b50805adc8f4252 by david.allsopp
Tidy installation of static builds

- $libdir/stublibs is no longer created for a --disable-shared build
- When $libdir/stublibs is not created, it is also not added to ld.conf
The file was modifiedMakefile
The file was modifiedotherlibs/systhreads/Makefile
The file was modifiedconfigure.ac
The file was modifiedotherlibs/Makefile.otherlibs.common
The file was modifiedconfigure
Commit bbecf548a77d2789b597da2a0b6966c804003d6b by david.allsopp
Fix the detection of Cygwin-like build environments

Both Cygwin and MSYS2 are now consistently detected on MSYS2. In
particular, this means that ./configure --prefix $PWD/install and
similar will cause the prefix to be correctly translated to a Windows
path, as already happens on Cygwin.
The file was modifiedconfigure.ac
The file was modifiedconfigure
Commit 7909b39e7b8b994559e1d5f7a6457bd1a5c5a811 by david.allsopp
Preserve backslashes in --prefix

Previously, the --prefix argument was always normalised with cygpath -m
which meant that regardless of the argument, the paths used in the
compiler would always use slashes.

This behaviour is preserved if a slash is detected in the argument, i.e.
the caller explicitly uses mixed notation (e.g. `--prefix=C:/Prefix` or
`--prefix $PWD/install`). In particular, it means that a Cygwin-style
path will be correctly converted to a Windows-style path.

If the path uses backslashes, then it is still converted to use forward
slashes for the installation commands, but the backslashes are otherwise
preserved and used within the build itself.
The file was modifiedconfigure
The file was modifiedconfigure.ac
The file was modifiedtools/ci/appveyor/appveyor_build.sh
The file was modified.github/workflows/build-msvc.yml
Commit d79b6eda4e1579b972df93cc6828ba931e420e44 by david.allsopp
Harden startup of -custom executables

By default, ocamlrun first tries to resolve argv[0] to determine where
the bytecode image is and then tries opening the executable image
itself. This is obviously correct for ocamlrun, when being called using
a shebang or executable header, but it's not correct for -custom
executables where we _know_ that the bytecode image should be with the
executable. To achieve this, a new mode is added to
caml_byte_program_mode (and the existing ones renamed) such that
caml_byte_program_mode is now STANDARD (for ocamlrun - the existing
behaviour), APPENDED (for -custom executables - the new behaviour) and
EMBEDDED (for -output-complete-exe/-output-obj - the original use of
it).

The mode is also set directly by the linker, rather than having a
default in libcamlrun which is then overridden by the startup code for
-output-complete-exe.

In the new APPENDED mode, if caml_executable_name is implemented (i.e.
it returns a string) then this file _must_ contain the bytecode image
and no other mechanisms are used. On platforms where
caml_executable_name is not implemented, APPENDED falls back to STANDARD
for compatibility.

Technically, this stops an argv[0] injection attack on setuid/setgid
-custom bytecode executables, although setuid should be used with
-output-complete-exe, if at all.
The file was modifiedruntime/backtrace_byt.c
The file was modifiedruntime/startup_byt.c
The file was modifiedruntime/gen_primsc.sh
The file was modifiedbytecomp/bytelink.ml
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedruntime/caml/startup.h
Commit 6b619ea0c7dfdf7160a4390b01afa41f6c0e1f98 by david.allsopp
Interpret . in runtime-launch-info

The runtime-launch-info file includes the location of the binary
directory. The compiler is extended so that . refers to the directory of
the compiler binary.
The file was modifiedbytecomp/bytelink.ml
The file was modifiedboot/ocamlc
The file was modifiedboot/ocamllex
Commit 3fea5f1dde60b772b43f18db50df1e0ee70ea731 by david.allsopp
Add --with-relative-libdir configure option

--with-relative-libdir can be used instead of --libdir to specify a
directory relative to --bindir which is used by the compiler to compute
the location of the Standard Library.
The file was modifiedMakefile.build_config.in
The file was modifiedconfigure
The file was modifiedconfigure.ac
Commit 59c0e2524010ddcf8ae059ba73d9eb8c8fa80d6c by david.allsopp
Add caml_standard_library_default to the runtime

Previously, the bytecode runtime just use OCAML_STDLIB_DIR from
build_config.h. This value is now stored once in stdlib.o as
caml_standard_library_default.
The file was modifiedruntime/caml/startup.h
The file was addedruntime/stdlib.c
The file was modifiedMakefile
The file was modifiedruntime/dynlink.c
The file was modifiedruntime/startup_byt.c
Commit 2b5abd4c0ef4baed99c90ab47d1f3d4cbc1fc76a by david.allsopp
Add -set-runtime-default

Allows the default location used by the bytecode runtime for the
Standard Library to be overridden when creating bytecode executables.
The file was modifiedbytecomp/bytelink.ml
The file was modifieddriver/main_args.ml
The file was modifiedutils/clflags.ml
The file was modifieddriver/optmaindriver.ml
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedMakefile
The file was modifieddriver/compenv.ml
The file was modifieddriver/compenv.mli
The file was modifiedutils/clflags.mli
The file was modifieddriver/maindriver.ml
The file was modifiedutils/config.common.ml.in
The file was modifieddriver/main_args.mli
The file was modifiedutils/config.mli
Commit ab8e854f2bb756095ee443a78cea22446bb3710e by david.allsopp
Add %standard_library_default
The file was modifiedlambda/lambda.ml
The file was modifiedmiddle_end/flambda/closure_conversion.ml
The file was modifiedasmcomp/cmm_helpers.mli
The file was modifiedmiddle_end/compilenv.mli
The file was modifiedbytecomp/bytesections.ml
The file was modifiedruntime/sys.c
The file was modifiedmiddle_end/closure/closure.ml
The file was modified.depend
The file was modifiedasmcomp/asmlink.ml
The file was modifiedbytecomp/bytelink.ml
The file was modifiedtools/objinfo.ml
The file was modifiedmiddle_end/compilenv.ml
The file was modifiedasmcomp/cmm_helpers.ml
The file was modifiedruntime/startup_byt.c
The file was modifiedasmcomp/asmpackager.ml
The file was modifiedbytecomp/bytesections.mli
The file was modifiedbytecomp/bytegen.ml
The file was modifiedlambda/lambda.mli
The file was modifiedlambda/translprim.ml
The file was modifiedlambda/printlambda.ml
The file was modifiedfile_formats/cmx_format.mli
Commit 1564a29e60e362c103b8c40cc844fb832d91e49a by david.allsopp
Bootstrap
The file was modifiedboot/ocamllex
The file was modifiedboot/ocamlc
Commit 3d5e8221f4ae6f14ea32defe279367216c3704db by david.allsopp
Use %standard_library_default in Config
The file was modifiedMakefile.cross
The file was modifiedMakefile.build_config.in
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedutils/config.generated.ml.in
Commit 3dc1b7ecd4d7c17f3141ac865b5d1929784c9709 by david.allsopp
Allow libdir to be found relative to bindir

When configured with --with-relative-libdir, the runtime uses the
directory of the executable to determine the location of the Standard
Library. Thus, ocamlrun and the compilers look for ../lib/ocaml by
default.

This is implemented by changing caml_standard_library_default to be a
relative path, and then computing the actual value at startup (for
bytecode) and when queried (for native, since it is only ever used if
Dynlink is being used).

Executables (and objects) produced by the compiler always have an
absolute value of caml_standard_library_default. ocamlc.opt and
ocamlopt.opt are built using -set-global-string to force
caml_standard_library_default to stay a relative value.
The file was modifiedMakefile
The file was modifiedruntime/win32.c
The file was modifiedruntime/startup_byt.c
The file was modifiedutils/config.generated.ml.in
The file was modifiedruntime/dynlink.c
The file was modifiedutils/config.fixed.ml
The file was modifiedMakefile.common
The file was modifiedocamltest/ocaml_tests.ml
The file was modifiedutils/config.mli
The file was modifiedocamltest/ocamltest_config.ml.in
The file was modifiedruntime/startup_aux.c
The file was modifiedbytecomp/dll.ml
The file was modifiedutils/config.common.ml.in
The file was modifiedasmcomp/asmlink.ml
The file was modifiedtools/ocamlmklib.ml
The file was modifiedruntime/sys.c
The file was modifiedruntime/caml/startup_aux.h
The file was modifiedconfigure.ac
The file was modifiedconfigure
The file was modifiedruntime/caml/osdeps.h
The file was modifiedruntime/caml/sys.h
The file was modifiedocamltest/ocamltest_config.mli
The file was modifiedtools/stripdebug.ml
The file was modifiedbytecomp/bytelink.ml
The file was modifiedruntime/caml/startup.h
The file was modifiedruntime/unix.c
The file was modifiedruntime/caml/s.h.in
The file was modifiedruntime/startup_nat.c
The file was modifiedruntime/stdlib.c
Commit ea4f30996998bcad614bf3f88097b26cabb0bde0 by david.allsopp
Update the installation test for enable-relative
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedtestsuite/in_prefix/README.md
The file was modifiedtestsuite/in_prefix/Makefile.test
Commit 292f3d3c66dcce75b983334e8077da327def23f2 by david.allsopp
Test --with-relative-libdir in CI
The file was modified.github/workflows/build-msvc.yml
The file was modifiedMakefile
The file was modifiedtools/ci/actions/runner.sh
The file was modifiedappveyor.yml
The file was modifiedtools/ci/appveyor/appveyor_build.sh
The file was modified.github/workflows/build.yml
Commit cc4747afb485ea7e3a3bb0a4281daf1eaa592075 by david.allsopp
NFPR: fully test --with-relative-libdir in precheck
The file was modifiedtools/ci/inria/main
Commit 94d4fccce39553ca216f1c9474f25859e1300cb0 by david.allsopp
Use as directly on Cygwin, as on Linux
The file was modifiedconfigure
The file was modifiedconfigure.ac
Commit b957ce93d4fb93be7c94615b2fc14d5afc402978 by david.allsopp
Detect but ignore -fdebug-prefix-map on mingw-w64

mingw-w64 is based on GCC, so supports -fdebug-prefix-map, but the test
for it is skipped in configure. The test is no longer skipped (which
means that Config.c_has_debug_prefix_map returns true) but the flag is
still explicitly not used by the compilers (as before).
The file was modifiedconfigure
The file was modifiedutils/ccomp.ml
The file was modifiedconfigure.ac
Commit b591d1aaebf8c2aa94629f161443e886624e2931 by david.allsopp
Increase reproducibility of relative artefacts
The file was modifiedtestsuite/tests/tool-debugger/find-artifacts/debuggee.ml
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedconfigure
The file was modifiedMakefile.common
The file was modifiedtestsuite/tests/native-debugger/linux-lldb-amd64.ml
The file was modifiedtestsuite/tests/native-debugger/linux-lldb-arm64.ml
The file was modifiedconfigure.ac
Commit 9efd96ec8ff90a012563acde8784041d53fe2326 by david.allsopp
Typo in stdlib/Makefile

Affects forced recompilation of runtime-launch-info
The file was modifiedstdlib/Makefile
Commit 6842b79a5a37fdbc908fb93ba348882aa7f812ed by david.allsopp
Reduce tmpheader.exe to 4-5KiB on Windows

stdlib/headernt.c was adapted in OCaml 3.00 to reduce its size by
avoiding the use of the CRT and using Windows API functions directly
(this is a well-studied trick on Windows, principally as a puzzle for
producing tiny binaries).

This got "regressed" slightly in OCaml 4.06, in the complex introduction
of wide character support for Windows, as the mingw-w64 incantation
required was unclear, so the entry point was changed to wmain, and the
size of the header increased.

By switching from wcslen (a CRT function) to lstrlen (a Win32 API
function), headernt.c again only requires kernel32.dll.

Additional flags are added for both ld (mingw-w64) and link (MSVC) to
squeeze every last byte out of tmpheader.exe. The MSVC version of the
header is once again no longer passed through strip, as this was found
to be corrupting the executable (and had never been reducing its size
anyway).
The file was modifiedstdlib/Makefile
The file was modifiedstdlib/headernt.c
Commit 0811c5ca04787ed5e52f4bc9dc6ff2d0e3eea403 by david.allsopp
Stop using Caml_inline and Camlnoret in headernt.c

headernt.c will never be compiled with a C++ compiler, so _Noreturn can
be used directly, and modern C compilers are sufficiently intelligent to
work out when to inline!
The file was modifiedstdlib/headernt.c
Commit 479079d6219d303e9f79131b63ed293fe45a317b by david.allsopp
Remove unnecessary guards around unistd.h

Already updated to remove the actual test in s.h, since XPG1 (1985)
required it and it is therefore part of the Single Unix
Specification (1992), but the _WIN32 guard and the loading of s.h are
unnecessary.
The file was modifiedstdlib/header.c
Commit 1182c5259b3989d52aef97a48745251d12cb4bad by david.allsopp
Use PATH_MAX instead of MAXPATHLEN
The file was modifiedstdlib/header.c
Commit 0d618cfe1d9f9690f246fa260d76cf071263ae5b by david.allsopp
Assume S_ISREG and SEEK_END

Defined in sys/stat.h and unistd.h respectively by the Single Unix
Specification.
The file was modifiedstdlib/header.c
Commit 6972708db3502e2db87d15e350d98d6d06bfec4f by david.allsopp
Move O_BINARY definition to "header" section

O_BINARY is added for maximum Cygwin compatibility, but it's not a Posix
flag.
The file was modifiedstdlib/header.c
Commit 7544fba9f9242452e89f43e0c5596bba23fbda35 by david.allsopp
Make caml/exec.h independent

Have exec.h include <stdint.h> itself. The bytecode executable header
now only depends on exec.h.
The file was modifiedstdlib/headernt.c
The file was modifiedruntime/caml/exec.h.in
The file was modifiedstdlib/header.c
Commit 74b652ad7199b36c7505fd8779b9238a43d373cd by david.allsopp
Re-order some header functions (no-op)
The file was modifiedstdlib/header.c
The file was modifiedstdlib/headernt.c
Commit ad1636eb9fa0ee109591411ccc00ad5e269d5413 by david.allsopp
Share error path in headernt.c
The file was modifiedstdlib/headernt.c
Commit 2f78f31373132652cacea24f63a7588d4b3eef3a by david.allsopp
Unify implementation of read_size

Modernisations applied in headernt.c but not applied to header.c - use
uint32_t rather than unsigned long
The file was modifiedstdlib/headernt.c
The file was modifiedstdlib/header.c
Commit 7202da84880e9655c284ebc651907cae64489885 by david.allsopp
headernt.c: inline run_runtime into main
The file was modifiedstdlib/headernt.c
Commit 51f59d219f824c6eaae022d45586dc75fbbcee8b by david.allsopp
Check for errors from lseek in header.c
The file was modifiedstdlib/header.c
Commit c3aaf074fdbab21e77c61bc60b9dd80995e25fc5 by david.allsopp
Refactor error display code
The file was modifiedstdlib/headernt.c
The file was modifiedstdlib/header.c
Commit bf99611f4b0f2e6b612430901bcf72ca9f3b2f71 by david.allsopp
header.c: close bytecode image before exec

Leaking fd
The file was modifiedstdlib/header.c
Commit 3c53170676a82696d90273c4d8b2ff90bb07b25c by david.allsopp
Tweak the signature of read_runtime_path
The file was modifiedstdlib/header.c
The file was modifiedstdlib/headernt.c
Commit 7cf81d45f27f610d9e7a9e806e336da0e76c7b52 by david.allsopp
Use execvp in header.c (as in headernt.c)

Brings the behaviour of the two headers into line with each other - if
RNTM is ocamlrun on Unix, ocamlrun will now be sought in PATH.
The file was modifiedstdlib/header.c
Commit 41e990f6ff750a60a07ac0095d4ec067bf458025 by david.allsopp
headernt: make read_runtime_path more CRTish
The file was modifiedstdlib/headernt.c
Commit 395db6f716638b87896ddf7d9b2111823808b87a by david.allsopp
Missing error case in headernt.c
The file was modifiedstdlib/headernt.c
Commit 1fe8819603d9d2f79b5eb08e131f5f725ca17040 by david.allsopp
Unify the common parts of header.c and headernt.c
The file was modifiedstdlib/header.c
The file was modifiedstdlib/headernt.c
Commit d86654eca31d92f2ac476ff9fd91f78afb81dc05 by david.allsopp
Merge stdlib/header{,nt}.c
The file was modifiedtestsuite/in_prefix/README.md
The file was removedstdlib/headernt.c
The file was modifiedstdlib/Makefile
The file was modifiedstdlib/header.c
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 925fd46cf1f9cdb36e9749cc76272735a7a7d4e0 by david.allsopp
Add -launch-method to ocamlc

When linking a normal bytecode executable, allows an explicit selection
of either the executable or shebang header, regardless of the value in
runtime-launch-info.
The file was modifiedutils/clflags.mli
The file was modifiedbytecomp/bytelink.ml
The file was modifiedutils/clflags.ml
The file was modifieddriver/main_args.ml
The file was modifieddriver/main_args.mli
Commit 3802d01e6f8749670d766b7d21f0ab3de0b9cecf by david.allsopp
Test both bytecode header methods
The file was modifiedutils/config.mli
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedutils/config.fixed.ml
The file was modifiedutils/config.generated.ml.in
Commit 4762df45cbff5a62323acb0869ce5e7e98402ff9 by david.allsopp
Determine RuntimeID values in configure
The file was modifiedconfigure
The file was modifiedMakefile
The file was modifiedutils/config.generated.ml.in
The file was modifiedMakefile.build_config.in
The file was modifiedutils/config.mli
The file was modifiedutils/config.fixed.ml
The file was modifiedruntime/caml/version.h.in
The file was modifiedbuild-aux/ocaml_version.m4
The file was addedruntime/Mangling.md
The file was modifiedMakefile.config.in
The file was modifiedconfigure.ac
The file was modifiedutils/config.common.ml.in
Commit d706752e86225fe478c189307da5493cc5a24e18 by david.allsopp
Put Bytecode RuntimeID in runtime-launch-info
The file was modifiedbytecomp/bytelink.ml
Commit 9dba7aa1cd60f3eb1816daa20aafcaa0a51a1aa7 by david.allsopp
Bootstrap
The file was modifiedboot/ocamlc
The file was modifieddriver/main_args.ml
The file was modifiedboot/ocamllex
The file was modifiedbytecomp/bytelink.mli
Commit 8448c2a019070e99fc453adfafe3f4bd36c8991e by david.allsopp
Mangle the bytecode runtime names
The file was modifiedconfigure.ac
The file was modifiedruntime/startup_byt.c
The file was modifiedconfigure
The file was modifiedbytecomp/bytelink.ml
The file was modifiedMakefile
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 46d259d26d7fc989a287ff9250f0f5fb209fd644 by david.allsopp
Build suffixed shared runtimes

New names for libcamlrun_shared.so and libasmrun_shared.so without the
_shared suffix and using the target triplet and runtime ID. Both ocamlc
and ocamlopt explicitly recognise `-runtime-variant _shared` and select
the correct name.

Symbolic links for libcamlrun_shared.so and libasmrun_shared.so to allow
any C programs which linked against the the output of `-output-obj` to
continue to work.
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedbytecomp/bytelink.ml
The file was modifiedasmcomp/asmlink.ml
The file was modifiedMakefile
Commit 9daece228c46e412c74dcd1705bbe9cac9191fbd by david.allsopp
Add Zinc RuntimeID Mask for portability
The file was modifiedconfigure.ac
The file was modifiedutils/config.fixed.ml
The file was modifiedutils/config.mli
The file was modifiedutils/config.generated.ml.in
The file was modifiedconfigure
The file was modifiedMakefile
The file was modifiedMakefile.build_config.in
The file was modifiedruntime/Mangling.md
Commit 59593ad1d4142ead7952837a1e1a347efe20153c by david.allsopp
Compute the Zinc runtime ID in the linker

WIP work towards the use int31 bit (not completed) and the
additional_runtimes setting is present, although it's to be removed.
The file was modifiedutils/config.common.ml.in
The file was modifiedbytecomp/bytelink.ml
The file was modifiedconfigure.ac
The file was modifiedconfigure
The file was modifiedMakefile.build_config.in
The file was modifiedutils/config.generated.ml.in
The file was modifiedMakefile
The file was modifiedutils/misc.ml
The file was modifiedbytecomp/symtable.ml
The file was modifiedbytecomp/symtable.mli
The file was modifiedutils/config.fixed.ml
The file was modifiedutils/misc.mli
The file was modifiedutils/config.mli
Commit 03723f169ab55f2cf62cfd3750285ebfa132d6bf by david.allsopp
Bootstrap
The file was modifiedboot/ocamlc
Commit dba36711dd34447741b1d7e01923fc99374f445b by david.allsopp
Remove Bytecode RuntimeID in runtime-launch-info
The file was modifiedconfigure.ac
The file was modifiedbytecomp/bytelink.ml
The file was modifiedconfigure
Commit a8a2349a25594cc1e2ad38cabfc97bddd45ed50a by david.allsopp
Add runtime suffixes to bytecode stub libraries

ocamlc -dllib-suffixed appends the runtime's host triplet and bytecode
runtime ID to the supplied name when searching for the DLL, and records
the base name only in .cma / executable files.

ocamlmklib -suffixed instructs ocamlmklib to use -dllib-suffixed when
generating .cma files instead of -dllib.

The effect is that stub libraries built this way have names which will
be unique for a given configuration of OCaml and so will be ignored by
other runtimes.
The file was modifiedotherlibs/systhreads/Makefile
The file was modifiedtools/objinfo.ml
The file was modifiedotherlibs/dynlink/byte/dynlink_symtable.mli
The file was modifiedutils/clflags.ml
The file was modifiedocamltest/ocaml_actions.ml
The file was modifiedfile_formats/cmo_format.mli
The file was modifiedotherlibs/Makefile.otherlibs.common
The file was modifieddriver/compenv.ml
The file was modifieddriver/main_args.mli
The file was modifiedtools/ocamlmklib.ml
The file was modifiedutils/clflags.mli
The file was modifiedboot/ocamllex
The file was modifiedotherlibs/dynlink/byte/dynlink_symtable.ml
The file was modifiedbytecomp/bytelink.ml
The file was modifiedbytecomp/bytelink.mli
The file was modifieddriver/main_args.ml
The file was modifiedboot/ocamlc
The file was modifiedbytecomp/dll.ml
The file was modifiedotherlibs/dynlink/dynlink_config.ml.in
The file was modifieddriver/compenv.mli
The file was modifiedruntime/dynlink.c
The file was modifiedbytecomp/dll.mli
The file was modifiedotherlibs/dynlink/dynlink_config.mli
Commit fdeb00b681ff459dfdee871c02d16dfbdbb681d0 by david.allsopp
Make Windows header absolute (as on Unix)
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedbytecomp/bytelink.ml
The file was modifiedboot/ocamlc
Commit 17af444810e3867105554c90f1f119940b6f676a by david.allsopp
Add -runtime-search to ocamlc

-runtime-search {disable|enable|always} adds new features to the
launcher used for bytecode executables which do not embed their own
runtime. By default, the header continues to behave as before - the
launcher will attempt to start the runtime using the absolute path which
the compiler was configured with.

The new search mode will then search for the runtime first in the
directory containing the running executable and then in PATH.
The file was modifiedconfigure.ac
The file was modifiedstdlib/header.c
The file was modifiedstdlib/Makefile
The file was modifiedconfigure
The file was modifiedutils/clflags.ml
The file was modifiedutils/clflags.mli
The file was modifieddriver/main_args.ml
The file was modifieddriver/main_args.mli
The file was modifiedbytecomp/bytelink.ml
The file was modifiedruntime/caml/s.h.in
The file was modifiedtools/ocamlsize
Commit 47d0a78bed6949b684009a21d5c976335df1c8c0 by david.allsopp
Tweak the type
The file was modifieddriver/main_args.ml
The file was modifiedutils/clflags.ml
The file was modifiedbytecomp/bytelink.ml
The file was modifiedutils/clflags.mli
Commit 805204e26de0488c3542984a43eb7f880d85a64a by david.allsopp
Add --enable-runtime-search[-target] options

--enable-runtime-search controls the -runtime-search setting used to
build the compiler's own bytecode executables;
--enable-runtime-search-target controls the default value of
-runtime-search that ocamlc itself uses.
The file was modifiedutils/clflags.mli
The file was modifiedboot/ocamlc
The file was modifiedbytecomp/bytelink.mli
The file was modifiedconfigure.ac
The file was modifieddriver/main_args.ml
The file was modifiedbytecomp/bytelink.ml
The file was modifiedconfigure
The file was modifiedMakefile.build_config.in
Commit 00cf870b0f34500e92e2fd65b8e74b8817d63c48 by david.allsopp
Update the installation test for camlheader-search
The file was modifiedtestsuite/in_prefix/README.md
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedtestsuite/in_prefix/Makefile.test
Commit ebe5dced14378452552ab060337b15c2e82fa017 by david.allsopp
Use Config instead of runtime-launch-info
The file was modifiedbytecomp/bytelink.ml
The file was modifiedutils/clflags.ml
The file was modifiedutils/clflags.mli
The file was modifiedutils/config.generated.ml.in
The file was modifiedconfigure.ac
The file was modifiedconfigure
The file was modifieddriver/main_args.ml
The file was modifiedutils/config.fixed.ml
The file was modifiedboot/ocamlc
The file was modifiedMakefile.build_config.in
The file was modifiedutils/config.mli
The file was modifiedbytecomp/bytelink.mli
The file was modifiedMakefile
The file was modifiedMakefile.common
Commit 487c443147008f164bfa5a57e47c73299f169c50 by david.allsopp
Update the test
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedtestsuite/in_prefix/Makefile.test
Commit efe697e0cdd166c843bdfb3466841915e64922a2 by david.allsopp
Test --enable-runtime-search in CI
The file was modified.github/workflows/build-msvc.yml
The file was modified.github/workflows/build.yml
The file was modifiedtools/ci/appveyor/appveyor_build.sh
The file was modifiedtools/ci/actions/runner.sh
Commit 4be6be9946d62ae695c9f52d1d0b4a714077caf2 by david.allsopp
Compute the Zinc runtime ID

WIP work towards the use int31 bit (not completed) and the
additional_runtimes setting is present, although it's to be removed.
The file was modifiedstdlib/header.c
The file was modifiedbytecomp/bytelink.ml
Commit 08424beb6ba6728679e5fcb27da12b6c69b0e96d by david.allsopp
Bootstrap
The file was modifiedboot/ocamlc
Commit bc04abf32aad9ad838bca089f78fe2bec4eaa627 by david.allsopp
NFPR: fully test --enable-runtime-search in precheck
The file was modifiedtools/ci/inria/main
Commit bbc9a9eaf397a3267c6ad41d753dba4137fc6dea by david.allsopp
Move caml_search_dll_in_path to dynlink.c

Eliminates code duplication between unix.c and win32.c
The file was modifiedruntime/caml/osdeps.h
The file was modifiedruntime/win32.c
The file was modifiedruntime/unix.c
The file was modifiedruntime/dynlink.c
Commit 276648afb4c9714596dace4421771f6900c234aa by david.allsopp
header.c: remove unnecessary Cygwin workaround

This is no longer required (nor does it work). Cygwin 1.5.20 (July 2006)
added the transparent_exe option to the CYGWIN environment variable which
made open behave in the same way as stat. Cygwin 1.7.1 (December 2009 and,
despite the version number, the first release of Cygwin 1.7) made this
behaviour default (and removed the ability to turn it off).
The file was modifiedstdlib/header.c
Commit 944aad1c7288ca6a70c93170dd0c83b776f7185e by david.allsopp
Remove caml_cds_file

OCaml 4.x global which should have been removed with OCaml 5.0
The file was modifiedruntime/caml/backtrace.h
The file was modifiedruntime/backtrace_byt.c
Commit 9d06b67b086f9cd866968cea7cfa4080a9be181a by david.allsopp
Simplify the interface of caml_attempt_open

Previously, caml_attempt_open received a pointer to the string and
passed this string to caml_search_exe_in_path. This function allocates a
fresh string which was then assigned to that pointer.

This interface was a little cryptic to follow - in particular, there
were several scenarios in which the result was not being freed. It's
also not entirely clear that caml_attempt_open involved a PATH-search,
which appears to have been applied in error when CAML_DEBUG_FILE was
added.
The file was modifiedruntime/startup_byt.c
The file was modifiedruntime/caml/startup.h
The file was modifiedruntime/backtrace_byt.c
The file was modifiedruntime/startup_aux.c
Commit ba0859d68e0246a2eebc8fc6becdb2dddfaec6c9 by david.allsopp
header.c: handle parasitic case of argc < 1
The file was modifiedstdlib/header.c
Commit 9052fb6344f6156f67a77339a452888dda501c16 by david.allsopp
header.c: malloc the result of searchpath
The file was modifiedstdlib/header.c
Commit 3d2dd1bb324218b8a8353783bfa442b1a26fde41 by david.allsopp
Move searchpath from header.c into the runtime

Merge the path-searching code from stdlib/header.c with the runtime's
version.
The file was modifiedMakefile.cross
The file was modifiedruntime/caml/osdeps.h
The file was modifiedstdlib/header.c
The file was modifiedMakefile
The file was modifiedruntime/unix.c
The file was modifiedstdlib/Makefile
The file was addedruntime/unix_searchpath.c
Commit fd89c6ef92a34526e20baaa38a22a952514fa2f6 by david.allsopp
Use caml_executable_name in header.c
The file was addedruntime/unix_executable.c
The file was modifiedMakefile
The file was modifiedstdlib/header.c
The file was modifiedruntime/unix.c
The file was removedruntime/unix_searchpath.c
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 636bdb4fc91f157441a916b133b6d23f73d24e84 by david.allsopp
Don't check for shebang scripts on Windows

Bytecode startup includes a check which has no place on Windows.
The file was modifiedruntime/startup_byt.c
Commit 971956234ce012bffb7286b7b0e1bbc3bd6eb55a by david.allsopp
Preserve argv[0] on Unix in the executable header

Makes the behaviour of the Unix and Windows versions of the header
equivalent, in particular it means that if argv[0] doesn't describe the
executable, more things fail for Cygwin.
The file was modifiedstdlib/header.c
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit a0b0f4e03e92afcf74b2ef4f318210f7c74dce05 by david.allsopp
Harden the cloexec.ml test on Windows

On slower machines, it's possible for the main part of the test (in
fdstatus_main.ml) to complete before the cloexec.ml has actually
terminated as part of `Unix.execv` (this is an artefact of how the
underlying CRT `execv` call is implemented on Windows).

Strictly on native Windows, cloexec.ml creates an additional dummy file
and takes a write lock on it (with `Unix.lockf`). Before running, if
this file exists, fdstatus_main.ml will also try to take a write lock on
it, providing a way of fdstatus_main.ml being sure that its ancestor has
fully terminated without actually having to know its PID.
The file was modifiedtestsuite/tests/lib-unix/common/fdstatus_main.ml
The file was modifiedtestsuite/tests/lib-unix/common/cloexec.ml
Commit 686e97520a8d053149e383e2214a46bcaa77e9be by david.allsopp
Possible alternate approach...
The file was modifiedtestsuite/tests/lib-unix/common/cloexec.ml
The file was modifiedtestsuite/tests/lib-unix/common/fdstatus_main.ml
The file was modifiedtestsuite/tests/lib-unix/common/fdstatus_aux.c
Commit 023b2a0cf52fea58298730d527fb41fd3167b719 by david.allsopp
... and the bug-fix which goes with it
The file was modifiedotherlibs/unix/channels_win32.c
Commit 900d87c3bf69a018a05cceb92d74592f796060b9 by david.allsopp
Fix STARTUPINFO structure in stdlib/header.c

If a CRT application (including, therefore, another OCaml program),
exec's a bytecode program which uses the executable header, the
cbReserved2 and lpReserved2 fields of the STARTUPINFO structure are
quietly used by the CRT to pass handle information about open fds.

The status checker in the cloexec.ml test has C stubs, which causes
ocamltest to compile the bytecode version with -custom. The test is
split to have an additional intermediate pure OCaml program which simply
repeats either the Unix.execv or Unix.create_process call with the
Sys.argv it was applied. In bytecode, ocamltest compiles this program
just with -use-runtime, which means it uses the executable header on
Windows.

Without the change to header.c in this commit, that test begins to fail
in bytecode on Windows, because the CRT information about inherited
handles is not passed on to the status checker (the HANDLE values will
have been inherited, as that's a kernel function, but the CRT structures
regarding the fds are not initialised, which is what the checker than
looks at).

The fix here simplifies the code considerably - rather than initialising
a fresh STARTUPINFO structure, we simply use GetStartupInfo to retrieve
the one which was used to create the process itself and pass that to
CreateProcess - cbReserved2 and lpReserved2 are therefore passed on, and
the cloexec.ml test passes again.
The file was modifiedstdlib/header.c
The file was modifiedtestsuite/tests/lib-unix/common/fdstatus_main.ml
The file was addedtestsuite/tests/lib-unix/common/cloexec_leap.ml
The file was modifiedtestsuite/tests/lib-unix/common/cloexec.ml
Commit 654e8a760f723afe532659ac76d28e535b91875e by david.allsopp
Share image fd between header.c and startup_byt.c

The bytecode executable launcher (stdlib/header.c) can _only_ invoke
ocamlrun after it has opened itself in order to find out the name of the
runtime to execute. However, once ocamlrun is exec'd, the knowledge of
this file was previously lost and if it could not be recovered from
argv[0], then execution fails.

This new approach, for both Windows and Unix, instead keeps the fd for
the bytecode image open and passes its number to ocamlrun as
__OCAML_EXEC_FD in the environment. ocamlrun detects this environment
variable and uses that fd to load the bytecode image. If this fails, the
runtime does _not_ fallback to any other mechanisms.

On Windows, it is possible to recover the filename from a HANDLE. It is
not portably possible to do this on Unix, so the filename which was
opened by the stdlib/header.c is instead appended to the environment
variable.
The file was modifiedruntime/startup_byt.c
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedstdlib/header.c
Commit 307ef05ed20600dd219fb112847bab7eab22e1c8 by david.allsopp
Add comments on the handling of blank env vars

Clarify in various places the behaviour of reading an environment
variable which is "Set But Null" (i.e. equal to the empty string as
opposed to unset)
The file was modifiedbytecomp/dll.ml
The file was modifiedruntime/unix.c
The file was modifiedtoplevel/topcommon.ml
The file was modifieddebugger/unix_tools.ml
Commit a87aa9e0c3a5740553e48df49533edfc1bcd5d08 by david.allsopp
Ignore empty TMPDIR in the Filename module

For Unix, the Filename module now treats TMPDIR being set to the
empty string, as if it were not set at all (which causes it to use /tmp
instead).
The file was modifiedstdlib/filename.ml
Commit 3a8130bc12aa0688051ae351d788bca3f45d1ab5 by david.allsopp
Ignore empty TMPDIR in ocamlyacc

If TMPDIR is set to the empty string, the Unix build of ocamlyacc now
defaults to /tmp (as it would if TMPDIR were not set at all).

The Windows default for when TMPDIR is not set is alredy the current
directory, so no change is required.
The file was modifiedyacc/main.c
Commit ecb51c0fe0a521846f8c97a00e551b4d4f3f79c5 by david.allsopp
Propagate non-empty tmpdir in ocamlyacc

By making tmpdir explicitly "." in the rare corner-case of TMPDIR being
set to the empty string on Windows, it becomes unnecessary to keep
checking whether tmpdir is zero-length.
The file was modifiedyacc/main.c
Commit 6fd4a3b82899b8d831c9f1b89e0aad8933e055d0 by david.allsopp
Ignore CAML_DEBUG_FILE if it's "Set But Null"
The file was modifiedruntime/startup_aux.c
Commit 923753be6baa7f6a4707f531b89dd34743222e38 by david.allsopp
Ignore OCAMLPROF_DUMP if it's "Set But Null"
The file was modifiedtools/profiling.ml
Commit e60c3f2a2ded8d5a4348edee2e7ffcc451eeea91 by david.allsopp
Use non-raising Sys.getenv_opt in win32unix

Use the non-raising Sys.getenv_opt internally in the Windows
implementation of the Unix module. In passing, treat the highly unlikely
corner case of COMSPEC being "Set But Null" as if COMSPEC were not set.
The file was modifiedotherlibs/unix/unix_win32.ml
Commit 3ec0672e708821212e2aba6aff811c2354735269 by david.allsopp
Ignore empty strings in Compmisc.set_from_env

Previously, invocations such as

OCAML_COLOR= ocamlopt

emitted warning 46 (bad-env-variable) which is not particularly helpful.
At present, Compmisc.set_from_env is used to implement OCAML_COLOR and
OCAML_ERROR_STYLE, neither of which attached significance to the empty
string. Compmisc.set_from_env is there changed to explictly ignore the
environment variable value if it is "".
The file was modifieddriver/compmisc.ml
The file was modifieddriver/compmisc.mli
Commit e411e2736db77a17e6f068dff4003e4b60496668 by david.allsopp
Ignore empty environment variables in ocamltest

Most uses in ocamltest were via its safe_getenv function which already
made unset and empty equivalent. This generalises the underlying
getenv_with_default_value function always to return the default value if
the variable is _either_ unset or set to the empty string.
The file was modifiedocamltest/ocamltest_stdlib.ml
Commit f672a5b263582f03822a2de4c74f9bb6c4c7295c by david.allsopp
Ignore empty MAKE variable in ocamltest
The file was modifiedocamltest/main.ml
Commit be8b5b953efe01b22112b4359baaa44fbed6af12 by david.allsopp
Treat OCAML_BINANNOT_WITHENV as unset when empty

This environment is intended to be used in the context of
OCAML_BINANNOT_WITHENV=1 to enable it, so treat OCAML_BINANNOT_WITHENV=
as if it weren't set at all.
The file was modifiedfile_formats/cmt_format.ml
Commit 10d2b42d2422ecd8c7bc01e79b5f8685e74091ea by david.allsopp
Harden processing of SOURCE_DATE_EPOCH in ocamldoc

Previously, running:

SOURCE_DATE_EPOCH= ocamldoc

resulted in an uncaught Failure "float_of_string" exception. The
processing of SOURCE_DATE_EPOCH is firstly hardened to cope with parsing
errors and then a one-time warning is displayed the first time it's
actually used (at present it's only required in Odoc_man).
The file was modifiedocamldoc/odoc_man.ml
The file was modifiedocamldoc/odoc_misc.mli
The file was modifiedocamldoc/odoc_misc.ml
The file was modified.depend
Commit c7c88a8299fb9449990c54e39091ad9107418b4b by david.allsopp
Add some limited information about CAMLSIGPIPE
The file was modifiedruntime/win32.c
The file was modifiedruntime/startup_byt.c
Commit 10323701477bf679f72aef9d2a18063943953721 by david.allsopp
Ignore empty OCAML_RUNTIME_EVENTS_ variables

The handling of OCAML_RUNTIME_EVENTS_DIR was incorrect if the value as
"Set But Null" and the intention in the manual for
OCAML_RUNTIME_EVENTS_START and OCAML_RUNTIME_EVENTS_PRESERVE is clearly
that they should be set to non-empty values in order to trigger the
required effect.

All three variables are now ignored if they are set, but to an empty
string.
The file was modifiedotherlibs/runtime_events/runtime_events.mli
The file was modifiedruntime/runtime_events.c
Commit 81486b09a676c4d148a22bf0f67f845138248e3c by david.allsopp
Ignore blank OCAMRUNPARAM, OCAMLLIB and CAMLLIB

Previously, if OCAMLRUNPARAM was "Set But Null", CAMLRUNPARAM was
completely ignored. Similarly, a "Set But Null" value for OCAMLLIB
caused CAMLLIB and subsequently the default location of the Standard
Library to be ignored. Especially for OCAMLLIB/CAMLLIB, this behaviour
is counter-intuitive, as it's highly unlikely to be useful.

Now, if OCAMLLIB is set, but to the empty string, then CAMLLIB is
checked and, more importantly, if it is either not set or also set to
the empty string then the default location of the Standard Library is
still used. For consistency, if OCAMLRUNPARAM is set, but to the empty string,
then CAMLRUNPARAM is read.
The file was modifiedutils/config.common.ml.in
The file was modifiedstdlib/.depend
The file was modifiedruntime/dynlink.c
The file was modifiedstdlib/hashtbl.ml
The file was modifiedruntime/startup_aux.c
The file was modifiedtestsuite/tests/backtrace/backtrace2.reference
Commit c1ebfe748dcf157e32076a2d205c8b52dbd37e1f by david.allsopp
Ignore empty components in PATH-like things

POSIX recognises empty components in a PATH-like variable as meaning "."
(the current directory). This is reflected in the processing of
OCAMLTOP_INCLUDE_PATH, CAML_LD_LIBRARY_PATH and ld.conf where either a
blank component or a blank line is interpreted as "."

Somewhat confusingly, this processing is applied inconsistently between
Unix and Windows (it's confusing given that Windowsm more readily
includes the current working directory by default in PATH searches).

It also has the side-effect that a "Set But Null" environment variable
is interpreted as "." which counter-intuitively makes
CAML_LD_LIBRARY_PATH= ocamlrun add the current working directory to the
search path.

Blank lines and empty components of both OCAMLTOP_INCLUDE_PATH and
CAML_LD_LIBRARY_PATH are now ignored. The current working directory can
still be explicitly included, of course, by adding a "." entry/line
where required.
The file was modifiedutils/misc.mli
The file was modifiedbytecomp/dll.ml
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedruntime/unix.c
The file was modifiedruntime/win32.c
The file was modifiedtoplevel/topcommon.ml
The file was modifiedruntime/dynlink.c
The file was modifiedutils/misc.ml
The file was modifiedruntime/startup_byt.c
Commit 3a99ba402b4c3d85f054afed95f33c4ce23fe005 by david.allsopp
Fix C library options for win32unix

-lws2_32 and -ladvapi32 are already supplied by default, so they don't
need to be in unix.cma/unix.cmxa. However, they do need to be passed
when building unix.cmxs, and they were previously acquired via
unix.cmxa. Tweak the way LDOPTS is used in Makefile.otherlibs.common
(which now is only used for the unix library) so that it's correctly
passed to both ocamlopt and ocamlmklib.
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedotherlibs/Makefile.otherlibs.common
The file was modifiedotherlibs/unix/Makefile
Commit 0cbdc48e80980a2f5af975405e7a848a5cf28579 by david.allsopp
Build and install threads.cmxs

Crucially, the corrects the flags used for creating a DLL on Windows,
allowing threads.cmxs to be loaded in ocamlnat.
The file was modifiedotherlibs/systhreads/Makefile
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedotherlibs/systhreads/st_stubs.c
Commit d5448c13f24fa234000f7df595450e26783500f8 by david.allsopp
Fix inclusion of libraries when partial linking

ld -r (certainly in GNU binutils) has an empty search path - co-opt the
MSVC search code and always resolve libraries when partial linking,
except this time _ignore_ the ones which are missing. This seems to fit
the rest of -output-complete-obj, given that the _standard_ C libraries
are also omitted (-lm, -lpthread, etc.)
The file was modifiedutils/ccomp.ml
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit e27aae2e07a6124078d4fdbf72fbda0cb99917ee by david.allsopp
Use entrypoint flexdll branch

Fixes loading unix.cmxs in Cygwin64
The file was modifiedflexdll
The file was modifiedtools/ci/inria/main
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit a401796d56ab4b61a2a1943ef3285eb9d97e5879 by david.allsopp
Revert "accept unknown options"

This reverts commit 31cbd26c16f81c8a273ad3ba988c49db6b0dbe38.
The file was modifiedtools/ocamlmklib.ml
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 94d90e080d309070665e461822c79ae24e29a2c9 by david.allsopp
Stop installing and documenting config_main, etc.

Config_main and Config_boot are built to ensure in the build that
utils/config.generated.ml.in and utils/config.fixed.ml are kept in sync
(so that the next bootstrap doesn't unexpectedly break). However,
because these files were generated in the utils directory, they were
picked up both by the install recipe and also when generating API
documentation.

It's slightly hairy to remove the wildcards and use filter, because we
can easily end up with command lines which are too long (even on Unix),
so instead these two modules are now generated in utils/config/
The file was modified.depend
The file was modified.gitignore
The file was modifiedMakefile
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit c9ee8a8818f6030e78c2f1276c16fa59ee5d7225 by david.allsopp
Use clang-cl for flexdll support objects
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedMakefile
Commit 9e0c965079a5ba5a744dea39fc6a8e8ef6c457a5 by david.allsopp
Add %shared_libraries primitive

Exposes the value of SUPPORT_DYNAMIC_LINKING.
The file was modifiedbytecomp/bytegen.ml
The file was modifiedruntime/win32.c
The file was modifiedlambda/translprim.ml
The file was modifiedlambda/lambda.mli
The file was modifiedlambda/printlambda.ml
The file was modifiedmiddle_end/flambda/closure_conversion.ml
The file was modifiedmiddle_end/closure/closure.ml
The file was modifiedruntime/unix.c
The file was modifiedlambda/lambda.ml
Commit afabfd68ff0957cc1f59ffaa8027e8dc99767a93 by david.allsopp
Bootstrap
The file was modifiedboot/ocamllex
The file was modifiedboot/ocamlc
Commit bbbe8ce594e904d952760ef5a8f53ef3f4800046 by david.allsopp
Improve the "dynamic loading not supported" error

It is possible, especially when using Dynlink, to end up in the
situation where a bytecode runtime which doesn't support dynamic loading
is asked to load support DLLs (e.g. a bytecode image with a DLLS
section, or a cma archive passed to the toplevel/Dynlink which has a
non-empty lib_dllibs list).

Previously, the error message would refer to the name of the first DLL
being loaded and simply state that dynamic loading is not supported. The
confusing part is that typically this would refer to a DLL which is not
on the system.

Now, the bytecode linker only writes DLLS and DLPT when there are
entries to write in them, and the runtime, toplevel and Dynlink provide
a direct explanation that dynamic loading is needed, but is not
available. In particular, the error now refers to the file which is
being loaded (i.e. the bytecode executable or the .cma file) rather than
a .so file which doesn't exist.
The file was modifiedtoplevel/byte/topeval.ml
The file was modifiedruntime/startup_byt.c
The file was modifiedotherlibs/dynlink/byte/dynlink.ml
Commit 72f6f200e76d515c76c7cc6bf4cf37af6bb3aba8 by david.allsopp
Free tables after handing off to Dynlink

In the debug runtime, caml_prim_name_table remains for the lifetime of
the program, as it's used by instrtrace.c, but in normal operation, once
the list of primitives has been handed over to Dynlink, its no longer
required. In the normal runtime, it's now freed after this handover.

In passing, strings themselves are no longer duplicated, as the code
path is a good deal simpler than it used to be, and the bytecode section
itself can reliably be used as the underlying buffer for
caml_prim_name_table.

caml_shared_libs_path is only kept at all to be handed over to Dynlink.
It, along with the two underlying buffers for CAML_LD_LIBRARY_PATH and
ld.conf are freed after the call.
The file was modifiedruntime/dynlink.c
The file was modifiedruntime/startup_byt.c
Commit b37353962e30850788dff787c632a14addee6458 by david.allsopp
Move print_magic and print_config out of caml_params

They are only used by the bytecode runtime and can be made static to
startup_byt.
The file was modifiedruntime/startup_aux.c
The file was modifiedruntime/caml/startup_aux.h
The file was modifiedruntime/startup_byt.c
Commit 396cea3bbea9652f1e044ec3809d0159d8761948 by david.allsopp
Preserve option R in caml_runtime_parameters

The setting for R was previous omitted in Sys.runtime_parameters, since
it was only processed directly by the Hashtbl module and not stored in
the runtime. Option R is now processed in caml_parase_ocamlrunparam and
stored to be accessed and updated via new primitives for the Hashtbl
module.

Co-authored-by: David Allsopp <david.allsopp@metastack.com>
The file was modifiedstdlib/.depend
The file was modifiedruntime/startup_aux.c
The file was modifiedstdlib/hashtbl.ml
The file was modifiedtestsuite/tests/backtrace/backtrace2.reference
The file was modifiedruntime/gc_ctrl.c
The file was modifiedruntime/caml/gc_ctrl.h
Commit 6004764036bb5d3cd794fcc16b4c937d96a70493 by david.allsopp
Swap the V and v in caml_runtime_parameters

Consistency - options displayed in alphabetical order with the uppercase
letter appearing before the lowercase letter
The file was modifiedruntime/gc_ctrl.c
Commit f23ad31bf82ef810bfdc7892380ac75cbaec73a3 by david.allsopp
Add -set-runtime-default to the compilers

When linking an executable, allows to set default to OCAMLRUNPARAM
values. This new OCAMLRUNPARAM string is accessible using the
"caml_executable_ocamlrunparam" symbol or is embedded in a bytecode
section.

Co-authored-by: David Allsopp <david.allsopp@metastack.com>
The file was modifieddriver/compenv.ml
The file was modifiedasmcomp/cmm_helpers.mli
The file was modifiedruntime/caml/startup_aux.h
The file was modifiedasmcomp/asmlink.ml
The file was modifiedutils/clflags.ml
The file was modifieddriver/maindriver.ml
The file was modified.depend
The file was modifiedman/ocamlrun.1
The file was modifieddriver/compenv.mli
The file was modifiedutils/clflags.mli
The file was modifiedruntime/gc_ctrl.c
The file was modifiedasmcomp/cmm_helpers.ml
The file was modifiedbytecomp/bytesections.ml
The file was modifiedmanual/src/cmds/runtime.etex
The file was modifiedbytecomp/bytesections.mli
The file was modifiedruntime/gen_primsc.sh
The file was modifiedruntime/startup_aux.c
The file was modifiedtools/objinfo.ml
The file was modifiedruntime/startup_byt.c
The file was modifiedbytecomp/bytelink.ml
Commit f2ba0dd864bc1383960f2dd818549c94f1831f04 by david.allsopp
Test -set-runtime-default in test-in-prefix

The test programs in the run after the prefix has been renamed are
compiled with `-set-runtime-default R`, and the test program verifies
that Hashtbl.is_randomized returns the expected value.
The file was modifiedtestsuite/tools/test_in_prefix.ml
Commit 8f7d8758ffc7b0782085e39c544f838144d7b1ef by david.allsopp
Re-order initialisations in bytecode

In bytecode startup, defer allocating memory until after the bytecode
image has been loaded as far as possible.
The file was modifiedruntime/startup_byt.c
Commit db3fbbb84b17718600a61486805bd3e9eb66e1f1 by david.allsopp
Support c=1 mode in ocamlrun

The runtime's pooling mode has a slight Catch-22 problem for ocamlrun
when enabled using -set-runtime-default. Opening the bytecode file and
reading the ORUN section requires the memory subsystem.

In this revised version, caml_main in bytecode is particularly careful
to track exactly what will have been allocated prior to reading the ORUN
section and if ORUN requires the system to start pooling mode, the
runtime now takes temporary malloc'd copies of everything which has been
made so far so that it can be safely copied with a caml_stat_alloc
_after_ pooling mode has been enabled.
The file was modifiedruntime/caml/misc.h
The file was modifiedruntime/startup_byt.c
The file was modifieddriver/maindriver.ml