Skip to content
Aborted

Changes

Summary

  1. Add -set-runtime-default (details)
  2. Bootstrap (details)
  3. Use %standard_library_default in Config (details)
  4. Bootstrap (details)
  5. Allow libdir to be found relative to bindir (details)
  6. Update the installation test for enable-relative (details)
  7. Test --with-relative-libdir in CI (details)
  8. NFPR: fully test --with-relative-libdir in AppVeyor (details)
  9. NFPR: fully test --with-relative-libdir in precheck (details)
  10. Add Config.as_is_cc (details)
  11. Use as directly on Cygwin, as on Linux (details)
  12. Detect but ignore -fdebug-prefix-map on mingw-w64 (details)
  13. Increase reproducibility of relative artefacts (details)
  14. Simplify the computation for the runtime name (details)
  15. Permit single-quotes in prefix (details)
  16. ocamlobjinfo: display the runtime used by an image (details)
  17. Add -launch-method to ocamlc (details)
  18. Test both bytecode header methods (details)
  19. Remove metadata from runtime-launch-info (details)
  20. Factor out the exec code in stdlib/header.c (details)
  21. Add -runtime-search to ocamlc (details)
  22. Test all three bytecode search methods (details)
  23. Determine Runtime ID values in configure (details)
  24. Mangle the bytecode runtime executable names (details)
  25. Build suffixed shared runtimes (details)
  26. Add runtime suffixes to bytecode stub libraries (details)
  27. Bootstrap (details)
  28. Post-bootstrap cleanup (details)
  29. Add --enable-runtime-search[-target] options (details)
  30. Update the installation test for runtime-searching (details)
  31. Make Windows header absolute (as on Unix) (details)
  32. Test --enable-runtime-search in CI (details)
  33. NFPR: fully test --enable-runtime-search in precheck (details)
  34. Exclude the manual from git-archive tarballs (details)
  35. Exclude irrelevant files from git-archive (details)
  36. Exclude tests from git-archive tarballs (details)
  37. Don't explicitly install toplevel/byte/*.cmi (details)
  38. Don't explicitly install main.cmx and optmain.cmx (details)
  39. Remove duplicate installation in installopt (details)
  40. Don't install ocamldoc's .cmi files twice (details)
  41. Use implicit names when installing ocamldoc (details)
  42. Eliminate local for loops in install (details)
  43. Eliminate local if blocks in install (details)
  44. Remove invalid directory in source install (details)
  45. Sprinkle some meta-programming on the install target (details)
  46. Keep the stripped bytecode binaries (details)
  47. Straighten out the INSTALL_* Makefile variables (details)
  48. Remove the recursive invocation in install targets (details)
  49. Add SUBDIR_NAME to principal Makefiles (details)
  50. Use macros to generate installation commands (details)
  51. Add additional modes to make install (details)
  52. Generate an opam .install file and support script (details)
  53. Experimentally, use it (details)
  54. Generate a relocatable cloning script (details)
  55. Got an interpreter, and we're not afraid to use it (details)
  56. Mark winpthreads dependency as Windows-only (details)
  57. Mark input dependencies as build (details)
  58. Test opam in CI (details)
  59. Generator script for ocaml.config in opam (details)
  60. Remove need for shared libraries in ocaml-config (details)
  61. Update ocaml-config for 4.12 scheme (details)
  62. OCaml 3.07 version of gen_ocaml_config.ml.in (details)
  63. Windows fixes to ocaml-config (details)
  64. Update ocaml-config for the new OCaml 5 layout (details)
  65. Fully unify and update gen_ocaml_config.ml (details)
  66. Support relative paths in gen_ocaml_config.ml (details)
  67. Remove the MAX_PATH limit in header.c on Windows (details)
  68. Move caml_search_dll_in_path to dynlink.c (details)
  69. Remove caml_cds_file (details)
  70. header.c: handle parasitic case of argc < 1 (details)
  71. Remove unnecessary Cygwin path workarounds (details)
  72. header.c: malloc the result of searchpath (details)
  73. Move searchpath from header.c into the runtime (details)
  74. Use caml_executable_name in header.c (details)
  75. Don't check for shebang scripts on Windows (details)
  76. Simplify the interface of caml_attempt_open (details)
  77. Preserve argv[0] on Unix in the executable header (details)
  78. Fix STARTUPINFO structure in stdlib/header.c (details)
  79. Share image fd between header.c and startup_byt.c (details)
  80. Add comments on the handling of blank env vars (details)
  81. Ignore empty TMPDIR in the Filename module (details)
  82. Ignore empty TMPDIR in ocamlyacc (details)
  83. Propagate non-empty tmpdir in ocamlyacc (details)
  84. Ignore CAML_DEBUG_FILE if it's "Set But Null" (details)
  85. Ignore OCAMLPROF_DUMP if it's "Set But Null" (details)
  86. Use non-raising Sys.getenv_opt in win32unix (details)
  87. Ignore empty strings in Compmisc.set_from_env (details)
  88. Ignore empty environment variables in ocamltest (details)
  89. Ignore empty MAKE variable in ocamltest (details)
  90. Treat OCAML_BINANNOT_WITHENV as unset when empty (details)
  91. Add some limited information about CAMLSIGPIPE (details)
  92. Ignore empty OCAML_RUNTIME_EVENTS_ variables (details)
  93. Harden processing of SOURCE_DATE_EPOCH in ocamldoc (details)
  94. Ignore blank OCAMLRUNPARAM, OCAMLLIB and CAMLLIB (details)
  95. Ignore empty components in PATH-like things (details)
  96. Add %shared_libraries primitive (details)
  97. Bootstrap (details)
  98. Improve the "dynamic loading not supported" error (details)
  99. Free tables after handing off to Dynlink (details)
  100. Move print_magic and print_config out of caml_params (details)
  101. Preserve option R in caml_runtime_parameters (details)
  102. Swap the V and v in caml_runtime_parameters (details)
  103. Add -set-runtime-default to the compilers (details)
  104. Test -set-runtime-default in test-in-prefix (details)
  105. Re-order initialisations in bytecode (details)
  106. Support c=1 mode in ocamlrun (details)
  107. Fix C library options for win32unix (details)
  108. Build and install threads.cmxs (details)
  109. Fix inclusion of libraries when partial linking (details)
  110. Use entrypoint flexdll branch (details)
  111. Stop installing and documenting config_main, etc. (details)
  112. Use clang-cl for flexdll support objects (details)
  113. Two minor clean-ups in the in-prefix-tests (details)
  114. Add caml_output_value_with_compat primitive (details)
  115. Split Meta into two (details)
  116. Omit CRCS if caml_reify_bytecode isn't used (details)
  117. Eliminate post-processing of bootstrap artefact (details)
  118. Fold-back into the test (details)
Commit 002dee230c5b8cf1ff25877bcbe3e185c1fb8cf4 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 modifiedMakefile
The file was modifieddriver/compenv.ml
The file was modifiedasmcomp/asmlink.ml
The file was modifieddriver/optmaindriver.ml
The file was modifiedutils/clflags.ml
The file was modifiedbytecomp/bytelink.ml
The file was modifieddriver/main_args.mli
The file was modifiedutils/clflags.mli
The file was modifieddriver/maindriver.ml
The file was modifieddriver/main_args.ml
The file was modifieddriver/compenv.mli
The file was modifiedChanges
Commit d31a711ec2608e34a9d54f660927f0b27ce119e3 by david.allsopp
Bootstrap
The file was modifiedboot/ocamlc
The file was modifiedboot/ocamllex
Commit a0af12b5ddc9126824a92e1c7d2528347c067a5c by david.allsopp
Use %standard_library_default in Config

Config.standard_library_default is now implemented using the
%standard_library_default primitive. This allows a convenient test which
can be added for `-set-runtime-default`.

The change also makes the host-like nature of of
Config.standard_library_default clearer, as the build of the
cross-compiler must now (correctly) specify the location of its (target)
Standard Library.
The file was modifiedutils/config.common.ml.in
The file was modifiedtestsuite/tools/testLinkModes.ml
The file was modifiedutils/config.fixed.ml
The file was modifiedMakefile.common
The file was modifiedMakefile.cross
The file was modifiedtestsuite/tools/testDynlink.ml
The file was modifiedutils/config.generated.ml.in
Commit a55a16b3cb4a285250832293f2735ddf71469cc0 by david.allsopp
Bootstrap
The file was modifiedboot/ocamlc
Commit 9d596ed46de831b49325f35d09871acfbc5a486f 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).

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-runtime-default to force
caml_standard_library_default to be a relative value.
The file was modifiedocamltest/ocamltest_config.mli
The file was modifiedMakefile
The file was modifiedconfigure
The file was modifiedruntime/sys.c
The file was modifiedbytecomp/dll.ml
The file was modifiedocamltest/ocaml_tests.ml
The file was modifiedruntime/win32.c
The file was modifiedruntime/dynlink.c
The file was modifiedtools/ocamlmklib.ml
The file was modifiedruntime/caml/s.h.in
The file was modifiedbytecomp/bytelink.ml
The file was modifiedocamltest/ocamltest_config.ml.in
The file was modifiedChanges
The file was modifiedMakefile.common
The file was modifiedruntime/unix.c
The file was modifiedruntime/caml/startup.h
The file was modifiedutils/config.common.ml.in
The file was modifiedMakefile.cross
The file was modifiedutils/config.mli
The file was modifiedruntime/startup_byt.c
The file was modifiedruntime/caml/osdeps.h
The file was modifiedMakefile.build_config.in
The file was modifiedconfigure.ac
The file was modifiedasmcomp/asmlink.ml
Commit f404ca64a33a27552816823fd93cd5d276ccf3a4 by david.allsopp
Update the installation test for enable-relative
The file was modifiedtestsuite/tools/cmdline.ml
The file was modifiedtestsuite/in_prefix/Makefile.test
The file was modifiedtestsuite/tools/testDynlink.ml
The file was modifiedtestsuite/tools/testLinkModes.ml
The file was modifiedtestsuite/tools/harness.mli
The file was modifiedtestsuite/tools/test_ld_conf.ml
The file was modifiedtestsuite/tools/testToplevel.ml
The file was modifiedtestsuite/in_prefix/README.md
The file was modifiedtestsuite/tools/testBytecodeBinaries.ml
The file was modifiedtestsuite/tools/testRelocation.ml
The file was modified.depend
Commit a6fed2de090849e29be8814bafc8887990744d5a by david.allsopp
Test --with-relative-libdir in CI
The file was modifiedMakefile
The file was modified.github/workflows/build.yml
The file was modified.github/workflows/build-msvc.yml
The file was modifiedappveyor.yml
The file was modifiedtools/ci/actions/runner.sh
The file was modifiedtools/ci/appveyor/appveyor_build.sh
Commit 861ac901c558a2275bbac32d05df7ae2267588be by david.allsopp
NFPR: fully test --with-relative-libdir in AppVeyor
The file was modifiedappveyor.yml
Commit f14e954df147acb20c9dc808ca560c3855fc82f4 by david.allsopp
NFPR: fully test --with-relative-libdir in precheck
The file was modifiedtools/ci/inria/main
Commit a2a19f3ac454be7b4253975c5a17c8f35859f5f3 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 f4c0f7f2efd1cf23850b0ad98ea6835066e346f4 by david.allsopp
Use as directly on Cygwin, as on Linux
The file was modifiedconfigure
The file was modifiedconfigure.ac
Commit 48985ab7d5463a8ba28e4b3c73811d7b917c0bb8 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.ac
The file was modifiedutils/ccomp.ml
The file was modifiedconfigure
Commit 227f7035b76a2f3036362544d932d35fce1316c0 by david.allsopp
Increase reproducibility of relative artefacts
The file was modifiedMakefile.common
The file was modifiedtestsuite/tests/tool-debugger/find-artifacts/debuggee.ml
The file was modifiedtestsuite/tools/testRelocation.ml
The file was modifiedconfigure
The file was modifiedconfigure.ac
The file was modifiedtestsuite/tests/native-debugger/linux-lldb-amd64.ml
The file was modifiedtestsuite/tests/native-debugger/linux-lldb-arm64.ml
Commit 95412bce28ff0c2ff3cde06f29ac6b6eccde4577 by david.allsopp
Simplify the computation for the runtime name
The file was modifiedbytecomp/bytelink.ml
Commit 5d427fbf5e92951a63294cf7973217fa38365a8e by david.allsopp
Permit single-quotes in prefix

Minor tweaks needed to allow configuring, say, for "$PWD/install'd here"
The file was modifiedman/Makefile
The file was modifiedMakefile
Commit 0ca51c439b8dff3d396d2411dac6ee775179f8d7 by david.allsopp
ocamlobjinfo: display the runtime used by an image

ocamlobjinfo now parses both RNTM and shebang lines in order to display
the runtime being used by a bytecode executable.
The file was modifiedtestsuite/tools/environment.ml
The file was modified.gitignore
The file was addedbytecomp/byterntm.mli
The file was modifiedtools/ocamlsize
The file was modifiedtools/objinfo.ml
The file was modified.depend
The file was modifiedChanges
The file was modifiedMakefile
The file was addedbytecomp/byterntm.mll
Commit 24c1f4b4eb7c80ae10a01c86afe15a66c4a6fed5 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 modifiedutils/config.common.ml.in
The file was modified.depend
The file was modifiedChanges
The file was modifiedutils/config.mli
The file was modifieddriver/main_args.ml
The file was modifiedutils/clflags.ml
The file was modifiedbytecomp/bytelink.ml
The file was modifieddriver/main_args.mli
Commit ec0e3283e128051b97c6f677178e700f9b19199e by david.allsopp
Test both bytecode header methods
The file was modifiedtestsuite/tools/testLinkModes.ml
Commit 7727a5710ad079f1c8c7f8a8eb380068a2e8c988 by david.allsopp
Remove metadata from runtime-launch-info

-launch-method encapsulates the first line of runtime-launch-info. The
argument to -launch-method is extended slightly to encompass the second
line, thus `-launch-method 'sh /usr/local/bin'` represents the default
runtime-launch-info file on Unix. Additional fields are added to Config
so that the installed compiler simply uses default values, rather than
reading the two lines from runtime-launch-info. The build of the
compiler itself explicitly uses `-launch-method`, which leaves only the
executable launcher compiled from stdlib/header.c in
runtime-launch-info.
The file was modifiedtestsuite/tools/testRelocation.ml
The file was modifiedbytecomp/bytelink.ml
The file was modifiedutils/clflags.ml
The file was modifiedutils/config.fixed.ml
The file was modifiedMakefile.build_config.in
The file was modifiedstdlib/Makefile
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedconfigure.ac
The file was modifiedutils/config.common.ml.in
The file was modifiedutils/config.mli
The file was modifiedconfigure
The file was modifiedbytecomp/bytelink.mli
The file was modifiedMakefile.common
The file was modifiedutils/clflags.mli
The file was modifiedMakefile
The file was modifieddriver/main_args.ml
The file was modified.depend
The file was modifiedutils/config.generated.ml.in
Commit b8fbccd3d5c5c3f1328e8e6a49451a099d810a23 by david.allsopp
Factor out the exec code in stdlib/header.c
The file was modifiedstdlib/header.c
Commit 23670b00094f07d6265c9ae45a7d1a5a9acc1628 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 modifiedbytecomp/bytelink.ml
The file was modifiedtestsuite/tools/testBytecodeBinaries.ml
The file was modified.depend
The file was modifiedruntime/caml/s.h.in
The file was modifiedtools/ocamlsize
The file was modifiedtools/objinfo.ml
The file was modifiedtestsuite/tools/environment.ml
The file was modifiedutils/clflags.mli
The file was modifiedChanges
The file was modifiedbytecomp/byterntm.mli
The file was modifiedstdlib/header.c
The file was modifiedutils/config.common.ml.in
The file was modifiedconfigure
The file was modifiedtestsuite/tools/harness.ml
The file was modifiedconfigure.ac
The file was modifiedtestsuite/tools/harness.mli
The file was modifieddriver/main_args.ml
The file was modifiedMakefile.common
The file was modifiedutils/clflags.ml
The file was modifiedbytecomp/byterntm.mll
The file was modifieddriver/main_args.mli
The file was modifiedutils/config.mli
Commit 9345069964e8fb55c681a12dbb5b90c0161200a6 by david.allsopp
Test all three bytecode search methods
The file was modifiedtestsuite/tools/environment.mli
The file was modified.gitignore
The file was addedtestsuite/tools/dummy.c
The file was modifiedtestsuite/tools/harness.mli
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedtestsuite/tools/testLinkModes.ml
The file was modifiedtestsuite/tools/harness.ml
The file was modifiedMakefile
The file was modifiedtestsuite/in_prefix/Makefile.test
The file was modifiedtestsuite/tools/environment.ml
Commit 55895f86e605247810da8ae301b385c36a6ea89f by david.allsopp
Determine Runtime ID values in configure
The file was modifiedMakefile.config.in
The file was modifiedutils/config.common.ml.in
The file was modifiedutils/config.fixed.ml
The file was modifiedChanges
The file was modifiedMakefile.build_config.in
The file was modifiedconfigure
The file was modifiedbuild-aux/ocaml_version.m4
The file was modifiedconfigure.ac
The file was addedruntime/Mangling.md
The file was modifiedutils/config.generated.ml.in
The file was modifiedutils/misc.ml
The file was modifiedutils/misc.mli
The file was modifiedruntime/caml/version.h.in
The file was modifiedutils/config.mli
Commit 0cfac940eb26cd3cfa2d1c349e40a870630e69b8 by david.allsopp
Mangle the bytecode runtime executable names

New option --disable-suffixing controls whether the build should use any
of the computed values for mangling its own files.
The file was modifiedstdlib/Makefile
The file was modifiedtestsuite/in_prefix/Makefile.test
The file was modifiedtools/objinfo.ml
The file was modifiedconfigure
The file was modified.depend
The file was modifiedtestsuite/tools/cmdline.ml
The file was modifiedutils/misc.mli
The file was modifiedMakefile.common
The file was modifiedbytecomp/bytelink.ml
The file was modifiedtestsuite/tools/harness.ml
The file was modifiedtestsuite/tools/testBytecodeBinaries.ml
The file was modifiedruntime/startup_byt.c
The file was modifiedtestsuite/tools/testRelocation.ml
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedtestsuite/tools/environment.ml
The file was modifiedbytecomp/byterntm.mll
The file was modifiedconfigure.ac
The file was modifiedMakefile
The file was modifiedtestsuite/tools/harness.mli
The file was modifiedChanges
The file was modifiedMakefile.build_config.in
The file was modifiedbytecomp/byterntm.mli
The file was modifiedutils/misc.ml
Commit 95d3f8d9e779cb783804f561da8035d83cc99f82 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 modifiedutils/config.fixed.ml
The file was modifiedChanges
The file was modifiedMakefile
The file was modifiedutils/config.mli
The file was modifiedtestsuite/tools/testLinkModes.ml
The file was modifiedutils/config.generated.ml.in
The file was modifiedbytecomp/bytelink.ml
The file was modifiedutils/misc.ml
The file was modifiedasmcomp/asmlink.ml
The file was modifiedutils/misc.mli
Commit a641deec17a71e10b89bf650c60128b85f6a892f 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 modifiedbytecomp/dll.ml
The file was modifiedotherlibs/dynlink/byte/dynlink_symtable.ml
The file was modifiedocamltest/ocamltest_config.ml.in
The file was modifiedotherlibs/dynlink/dynlink_config.mli
The file was modifiedruntime/dynlink.c
The file was modifiedChanges
The file was modifiedocamltest/ocamltest_config.mli
The file was modifiedocamltest/ocaml_actions.ml
The file was modifiedotherlibs/systhreads/Makefile
The file was modifieddriver/compenv.ml
The file was modifiedutils/misc.ml
The file was modifiedutils/clflags.mli
The file was modifieddriver/main_args.mli
The file was modifieddriver/main_args.ml
The file was modifiedotherlibs/dynlink/dynlink_config.ml.in
The file was modifiedtools/ocamlmklib.ml
The file was modifiedutils/config.mli
The file was modifiedutils/misc.mli
The file was modifiedutils/clflags.ml
The file was modifiedtools/objinfo.ml
The file was modifiedbytecomp/dll.mli
The file was modifiedotherlibs/Makefile.otherlibs.common
The file was modifiedotherlibs/dynlink/byte/dynlink_symtable.mli
The file was modifiedfile_formats/cmo_format.mli
The file was modifieddriver/compenv.mli
The file was modifiedbytecomp/bytelink.ml
Commit b49e5fe9aa20a931f263482d3a8cfde2fb14167a by david.allsopp
Bootstrap
The file was modifiedboot/ocamlc
The file was modifiedboot/ocamllex
Commit 09ccc1991c1b2f21728b18e2fd66aec23aa6699d by david.allsopp
Post-bootstrap cleanup

boot/ocamlc now supports everything that the main compiler supports.
The file was modifiedMakefile.common
The file was modifiedMakefile
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedbytecomp/bytelink.ml
The file was modifiedconfigure
The file was modifiedconfigure.ac
The file was modifiedtestsuite/tools/cmdline.ml
The file was modifiedtestsuite/tools/harness.mli
The file was modifiedstdlib/header.c
The file was modifiedtestsuite/tools/harness.ml
The file was modifiedstdlib/Makefile
The file was modified.gitignore
Commit 965a8b6fc8ccfb201c402ff6c7fee57186015bc8 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 modifiedMakefile.build_config.in
The file was modifiedconfigure
The file was modifiedutils/config.fixed.ml
The file was modifiedutils/config.generated.ml.in
The file was modifiedChanges
The file was modifiedMakefile.common
The file was modifiedutils/clflags.ml
The file was modifiedutils/config.common.ml.in
The file was modifiedconfigure.ac
The file was modifiedutils/config.mli
Commit dfe5604bb17a6ced8774c505f61eb01bcedda608 by david.allsopp
Update the installation test for runtime-searching
The file was modifiedtestsuite/tools/cmdline.ml
The file was modifiedtestsuite/tools/testRelocation.ml
The file was modifiedtestsuite/in_prefix/Makefile.test
The file was modifiedtestsuite/tools/harness.ml
The file was modifiedtestsuite/tools/harness.mli
The file was modifiedtestsuite/tools/test_in_prefix.ml
The file was modifiedtestsuite/in_prefix/README.md
The file was modifiedtestsuite/tools/testBytecodeBinaries.ml
The file was modified.depend
The file was modifiedtestsuite/tools/testLinkModes.ml
Commit 89ee89ab55ba70149e6d6555b76db101d55ed1a9 by david.allsopp
Make Windows header absolute (as on Unix)
The file was modifiedtestsuite/tools/harness.mli
The file was modifiedconfigure
The file was modifiedconfigure.ac
Commit b6a645e237bc0b7407634247e49b8b67299cdecd by david.allsopp
Test --enable-runtime-search in CI
The file was modified.github/workflows/build-msvc.yml
The file was modifiedtools/ci/actions/runner.sh
The file was modified.github/workflows/build.yml
The file was modifiedtools/ci/appveyor/appveyor_build.sh
Commit 2ea2b5b569127b9e214389852809a0cdb7edfe0b by david.allsopp
NFPR: fully test --enable-runtime-search in precheck
The file was modifiedtools/ci/inria/main
Commit 3b9a43e42bceeacd45e162329999dc6b14ca6c8b by david.allsopp
Exclude the manual from git-archive tarballs
The file was modifiedconfigure
The file was modifiedconfigure.ac
The file was modifiedMakefile
The file was modified.gitattributes
Commit 239b20664c01209ead2be1a97cb31f8dc1772901 by david.allsopp
Exclude irrelevant files from git-archive

CI scripts and Git configuration aren't required on end-user machines.
The file was modified.gitattributes
Commit 114cfbee9ab835b73780b6a7589b4d8ebc1ac03e by david.allsopp
Exclude tests from git-archive tarballs

All the programs and infrastructure remain, but the tests are removed.
The file was modified.gitattributes
The file was modifiedtestsuite/Makefile
Commit c654b0d2dd20ef973ca27e7bc77e4932f6667ebb by david.allsopp
Don't explicitly install toplevel/byte/*.cmi

All of the .mli files in toplevel/byte are "common", so they're already
installed by the patterns in toplevel.
The file was modifiedMakefile
Commit 147a53963b68e0b1f7fba33b42873c81265c051a by david.allsopp
Don't explicitly install main.cmx and optmain.cmx

It's necessary to install main.o and optmain.o because the two modules
are not part of ocamlbytecomp.cmxa and ocamloptcomp.cmxa, but the .cmx
files are already installed as part of wildcard patterns on driver/
The file was modifiedMakefile
Commit 9642616d2bf9107588beaceed563fefbee62c241 by david.allsopp
Remove duplicate installation in installopt

The ocamldoc installation commands in installopt duplicate a series of
commands which already happen in install.
The file was modifiedMakefile
Commit c41fee311b71c6b77c7e98cc62d71bdc1b0210dc by david.allsopp
Don't install ocamldoc's .cmi files twice
The file was modifiedMakefile
Commit 20848b8dc6237ab46fed982301a5bdc943be3dfe by david.allsopp
Use implicit names when installing ocamldoc

The ocamldoc binaries were installed using a relative path. They're the
only binaries installed that way - switch them to use an implicit path,
as it's easier to make an implicit path subsequently relative if needed
than vice versa.
The file was modifiedMakefile
Commit a6ecd27c53c43f8b6917ff6262096267e697782a by david.allsopp
Eliminate local for loops in install

Continue to use for when invoking recursive make calls, but use
$(foreach ..) to generate command sequences so that macros can be used
in them.
The file was modifiedMakefile
Commit c27909fb603a7a4c5e10c3b7f7f16b91bfc00c88 by david.allsopp
Eliminate local if blocks in install
The file was modifiedapi_docgen/odoc/Makefile
The file was modifiedapi_docgen/ocamldoc/Makefile
The file was modifiedotherlibs/Makefile.otherlibs.common
The file was modifiedMakefile
Commit aeeaf4732356931aade91cad49f6861acf47d33c by david.allsopp
Remove invalid directory in source install

Line was added (with typo) in PR#8925 (4.09) and should have been
removed as part of PR#10355 (4.13)
The file was modifiedMakefile
Commit a3d2ee7f3b79440f96d360094ae623ca9e7d1061 by david.allsopp
Sprinkle some meta-programming on the install target
The file was modifiedMakefile
Commit e0238f0e56e55c667d817af69c499e054ceb0b3e by david.allsopp
Keep the stripped bytecode binaries

No need to remove things during install when it will be done later by a
package manager. Also prepares for the possibility of letting something
else install the binary subsequently.
The file was modified.gitignore
The file was modifiedMakefile.common
The file was modifiedMakefile
Commit 56ef27eca9bcd19d3c61b01fe30acf1df9eee8b3 by david.allsopp
Straighten out the INSTALL_* Makefile variables

Move various definitions around such that merged Makefile variables are
all in Makefile.common. Sanitise the names to be closer to
INSTALL_LIBDIR_subdirname.
The file was modifiedstdlib/Makefile
The file was modifiedMakefile
The file was modifiedapi_docgen/odoc/Makefile
The file was modifiedapi_docgen/ocamldoc/Makefile
The file was modifiedMakefile.common
The file was modifiedotherlibs/Makefile.otherlibs.common
The file was modifiedotherlibs/systhreads/Makefile
The file was modifiedman/Makefile
Commit b765aa503b91b33894e56ce178629fd4f8ec892b by david.allsopp
Remove the recursive invocation in install targets
The file was modifiedMakefile
Commit 66a716ff20f6331156dcc97fb1e89c94a917168e by david.allsopp
Add SUBDIR_NAME to principal Makefiles

SUBDIR_NAME goes along with ROOTDIR - where ROOTDIR is the relative path
from Makefile back to the root directory, SUBDIR_NAME is the implicit
path from the root directory to Makefile.
The file was modifiedapi_docgen/ocamldoc/Makefile
The file was modifiedstdlib/Makefile
The file was modifiedotherlibs/Makefile
The file was modifiedapi_docgen/odoc/Makefile
The file was modifiedman/Makefile
The file was modifiedotherlibs/systhreads/Makefile
The file was modifiedMakefile
The file was modifiedotherlibs/Makefile.otherlibs.common
The file was modifiedapi_docgen/Makefile
Commit 42a783fdbf5de2f78a9968e685e56ddbd4700292 by david.allsopp
Use macros to generate installation commands

make install works as it did before. All the commands in the install
targets now go through a macro call which allows the semantic intent of
each command to be more clearly specified.
The file was modifiedotherlibs/systhreads/Makefile
The file was modifiedapi_docgen/odoc/Makefile
The file was modifiedapi_docgen/ocamldoc/Makefile
The file was modifiedman/Makefile
The file was modifiedMakefile.common
The file was modifiedotherlibs/Makefile.otherlibs.common
The file was modifiedMakefile
The file was modifiedstdlib/Makefile
Commit 98e3d48911d0a3af6144f51bbe5445700a99b74d by david.allsopp
Add additional modes to make install

make [INSTALL_MODE=install] install
  - installs the compiler, as normal
make INSTALL_MODE=display install
  - displays the operations needed for
make INSTALL_MODE=list install
  - lists the files and symbolic links which are installed
The file was modifiedMakefile.common
Commit 6e1800cb35bea5b397a0069b94f799c463633acc by david.allsopp
Generate an opam .install file and support script

make INSTALL_MODE=opam install generates $OPAM_PACKAGE_NAME.install and
$OPAM_PACKAGE_NAME-fixup.sh ($OPAM_PACKAGE_NAME defaults to
ocaml-compiler). Nothing is installed by this mode. The fixup.sh script
is intentionally not made executable (it should be invoked explicitly
with sh) and creates symbolic links, if required, and also manually
copies the files to the doc dir, as the .install file format doesn't
allow the correct location to be specified.
The file was modifiedMakefile.common
The file was addedtools/opam/generate-install.sh
Commit 46eab47f4335fbe29ac7a1c9a4b04e6808e631de by david.allsopp
Experimentally, use it
The file was modifiedocaml-variants.opam
Commit 02d279544c72e189ecd0a74c70b0207e55e946d2 by david.allsopp
Generate a relocatable cloning script
The file was addedtools/opam/process.sh
The file was modified.gitattributes
The file was modifiedMakefile.common
The file was addedtools/opam/generate-clone.sh
Commit f59f66260b189212e4e9b496f3cd553ff3cc066f by david.allsopp
Got an interpreter, and we're not afraid to use it
The file was removedtools/opam/generate-clone.sh
The file was addedtools/opam/generate.ml
The file was modifiedMakefile.common
The file was removedtools/opam/generate-install.sh
Commit a41096ca925240001ee236120ee86a2ebcc98511 by david.allsopp
Mark winpthreads dependency as Windows-only

Redundant filter, but mitigates an issue with --assume-built in opam
The file was modifiedocaml-variants.opam
Commit d028c85bdc96c959f0aeeac2684347e56317ca55 by david.allsopp
Mark input dependencies as build

Mitigates an issue with opam install --assume-built since build
dependencies are ignored. The semantics should remain consistent: in
particular, as there is only a single version of each of these packages,
the key issue is that removing the package will still trigger the
correct behaviour as the dependency graph will change.
The file was modifiedocaml-variants.opam
Commit 3d3efe0ed306eaa8dedf4199ad9a6a3911946502 by david.allsopp
Test opam in CI
The file was modified.github/workflows/build-msvc.yml
The file was modifiedtools/ci/appveyor/appveyor_build.cmd
The file was modifiedtools/ci/appveyor/appveyor_build.sh
The file was modified.github/workflows/build.yml
The file was modifiedtools/ci/actions/runner.sh
Commit 9d08c2f36d138c0d7884f71da4ecb14791753cc7 by david.allsopp
Generator script for ocaml.config in opam

This script is installed in opam by the ocaml-config package and then
used by its ocaml virtual packages to probe the compiler installation
and record various pieces of information about it by generating
ocaml.config
The file was addedtools/opam/ocaml-config.install
The file was modified.gitattributes
The file was addedtools/opam/gen_ocaml_config.ml.in
Commit e44e3d4385f1a86932ec7507e21e02d8fdcfc464 by david.allsopp
Remove need for shared libraries in ocaml-config
The file was modified.gitattributes
The file was modifiedtools/opam/gen_ocaml_config.ml.in
Commit be5628907520538c68a1f42eef65cd10f3d50e29 by david.allsopp
Update ocaml-config for 4.12 scheme

- Versioning numbering used for pre-releases now uses ~ instead of +
- Support the new ocaml-option- package layout
The file was modifiedtools/opam/gen_ocaml_config.ml.in
The file was modified.gitattributes
Commit dc8531b3e1652718eb2529995b058f11bf3eb6d8 by david.allsopp
OCaml 3.07 version of gen_ocaml_config.ml.in
The file was modifiedtools/opam/gen_ocaml_config.ml.in
The file was modified.gitattributes
Commit e72cb7edce047da61504cc66366f5bdcf7f40c48 by david.allsopp
Windows fixes to ocaml-config

- Wrong separator used for generating CAML_LD_LIBRARY_PATH on Windows
- Fixed detection for the native-tools variable on Windows
- Support dkml-base-compiler
The file was modifiedtools/opam/gen_ocaml_config.ml.in
The file was modified.gitattributes
Commit f4b26c11df9e7fe9adc73a17c6264f954699ea5d by david.allsopp
Update ocaml-config for the new OCaml 5 layout
The file was modifiedtools/opam/gen_ocaml_config.ml.in
Commit d9768630d0a71055400548836c0534aa22721eb8 by david.allsopp
Fully unify and update gen_ocaml_config.ml

There was technically a slightly tailored version of gen_ocaml_config.ml
sitting in the history to support the OCaml 3.07 package (which is the
oldest compiler archived in opam-repository).

The ocaml-config package originally stored this script in the files/
subdirectory, but policy changes in 2025 mean it was being referenced
from an archive repository. This script can now be referenced directly
by opam's ocaml package, removing the need for an additional package in
the dependency cone and also meaning that the script no longer has to be
installed in the switch.

The substs mechanism has been replaced in favour of passing the required
arguments on the command line. The previous mechanism was an artefact of
the way this script was previously generated, rather than necessarily a
clear way of writing it. It means this script is now simply an OCaml
script and has the added benefit of allowing each ocaml package to
specify the appropriate additional version components (e.g. spacetime,
nnp, etc.) rather than having each script confusingly containing all of
them.
The file was modified.gitattributes
The file was addedtools/opam/gen_ocaml_config.ml
The file was removedtools/opam/ocaml-config.install
The file was removedtools/opam/gen_ocaml_config.ml.in
Commit 63fc454847224e72bab047a23686d6d25eabad42 by david.allsopp
Support relative paths in gen_ocaml_config.ml
The file was modifiedtools/opam/gen_ocaml_config.ml
Commit e80c8e60a799909794a129e28174b36682a5511e by david.allsopp
Remove the MAX_PATH limit in header.c on Windows
The file was modifiedstdlib/header.c
The file was modifiedChanges
Commit 622c3dfac90a2f326a5afb638b2d2e44ebfd675d 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/dynlink.c
The file was modifiedruntime/win32.c
The file was modifiedruntime/caml/osdeps.h
The file was modifiedruntime/unix.c
Commit 649f23cc76a779a983ba192d8727a0eb67c91218 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 f1aa27b1244fd0ab48e608f94855427df692bbc1 by david.allsopp
header.c: handle parasitic case of argc < 1
The file was modifiedstdlib/header.c
Commit 9c8e2754510b39f2d3903cca351ce898caa7f9b8 by david.allsopp
Remove unnecessary Cygwin path workarounds

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
The file was modifiedruntime/unix.c
Commit 335db5d1ea1e73769d84e4d3311c1fc121511dfc by david.allsopp
header.c: malloc the result of searchpath
The file was modifiedstdlib/header.c
Commit 8d721286b72dba4e745af21e8005dfc38f5bcb79 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 modifiedstdlib/Makefile
The file was addedruntime/unix_executable.c
The file was modifiedruntime/unix.c
The file was modifiedMakefile.cross
The file was modifiedruntime/caml/osdeps.h
The file was modifiedMakefile
The file was modifiedstdlib/header.c
Commit b1fd5829490d13b0acae242b0297926ca732437f by david.allsopp
Use caml_executable_name in header.c
The file was modifiedtestsuite/tools/testLinkModes.ml
The file was modifiedruntime/unix.c
The file was modifiedruntime/unix_executable.c
The file was modifiedstdlib/header.c
Commit fd41979d0ee56bc7a275f6a6236930ef97eb3cf9 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 6b227e9890a2eefd93484cd1f6c35caa94a28bcc 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_aux.c
The file was modifiedChanges
The file was modifiedruntime/backtrace_byt.c
The file was modifiedruntime/caml/startup.h
The file was modifiedruntime/startup_byt.c
Commit 1e99214f5421cce654a42e97eb3f3429645a3709 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/testLinkModes.ml
Commit dede651c6c232b109dc4df75e87647d9ea04631c 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 addedtestsuite/tests/lib-unix/common/cloexec_leap.ml
The file was modifiedtestsuite/tests/lib-unix/common/cloexec.ml
The file was modifiedstdlib/header.c
The file was modifiedtestsuite/tests/lib-unix/common/fdstatus_main.ml
Commit 848930e274081e0bb4a1e295561322937346a975 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 modifiedstdlib/header.c
The file was modifiedruntime/startup_byt.c
The file was modifiedtestsuite/tools/testLinkModes.ml
The file was modifiedChanges
The file was modifiedtestsuite/tools/testBytecodeBinaries.ml
Commit 564e69d21c238c9c828dcd5c461fc227d70d4908 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 modifieddebugger/unix_tools.ml
The file was modifiedtoplevel/topcommon.ml
Commit ed0ce03d3f03798fe6279097ca27f35f5f6677fd 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
The file was modifiedChanges
Commit 9c1d124951f980c9010d0c2b33f1c59bb6eb2008 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 modifiedChanges
The file was modifiedyacc/main.c
Commit edc396a4fd830b222cd22c92d30dfc9c21b444d6 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 bd0d4f500d5a8bc7c21514751db472d9d9cfc72a by david.allsopp
Ignore CAML_DEBUG_FILE if it's "Set But Null"
The file was modifiedruntime/startup_aux.c
The file was modifiedChanges
Commit 3ee037fc4155bd91a3d3c1d0066f5f748f3c4365 by david.allsopp
Ignore OCAMLPROF_DUMP if it's "Set But Null"
The file was modifiedtools/profiling.ml
Commit 1a480f9181c4ad732df838196b3571e3135e4fea 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 7452f8c68d19d5f9169bf15a521a7d3c98ca63ad 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 905f25ad2d2b509c43d5d741f2b35dd79bcb8cc1 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 84ab2f3c94cfaa941e79159f06afc1696e866d01 by david.allsopp
Ignore empty MAKE variable in ocamltest
The file was modifiedocamltest/main.ml
Commit fd95b83a26e15de36a065b8faaa5d81ae36c67e7 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 7bc87b94616af3c8f656b9742793e295871bde60 by david.allsopp
Add some limited information about CAMLSIGPIPE
The file was modifiedruntime/win32.c
The file was modifiedruntime/startup_byt.c
Commit fbd119553915448b254ecca08dd308cf42e033cc 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 d7d08578ab2bca04efeb0c9a561ea1ce5cb80c23 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_misc.mli
The file was modified.depend
The file was modifiedocamldoc/odoc_misc.ml
The file was modifiedocamldoc/odoc_man.ml
Commit 6f952d51184c00524f37e2f004ca51ff9323a529 by david.allsopp
Ignore blank OCAMLRUNPARAM, 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 modifiedtestsuite/tests/backtrace/backtrace2.reference
The file was modifiedstdlib/hashtbl.ml
The file was modifiedruntime/startup_aux.c
The file was modifiedChanges
Commit d979f37bb09a79f506e9c79eac40a8d0ce46eef0 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 Windows 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 modifiedruntime/unix.c
The file was modifiedruntime/win32.c
The file was modifiedutils/misc.ml
The file was modifiedutils/misc.mli
The file was modifiedChanges
The file was modifiedtestsuite/tools/test_ld_conf.ml
The file was modifiedruntime/startup_byt.c
The file was modifiedruntime/dynlink.c
Commit 39930b194f5021172ae6ab6edb26ddce93289747 by david.allsopp
Add %shared_libraries primitive

Exposes the value of SUPPORT_DYNAMIC_LINKING.
The file was modifiedlambda/printlambda.ml
The file was modifiedruntime/win32.c
The file was modifiedruntime/unix.c
The file was modifiedlambda/translprim.ml
The file was modifiedlambda/lambda.ml
The file was modifiedmiddle_end/flambda/closure_conversion.ml
The file was modifiedbytecomp/bytegen.ml
The file was modifiedlambda/lambda.mli
The file was modifiedmiddle_end/closure/closure.ml
Commit 6c9898a101b5b1017d69d70c2f29ab9955b69ccb by david.allsopp
Bootstrap
The file was modifiedboot/ocamlc
The file was modifiedboot/ocamllex
Commit 6b1fdaa988467dd3929592b536da284fa7c1a0c7 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 modifiedruntime/startup_byt.c
The file was modifiedotherlibs/dynlink/byte/dynlink.ml
The file was modifiedtoplevel/byte/topeval.ml
The file was modifiedChanges
Commit f221182b2d3bc2f368a7a500de0d256226abe8cb 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, it's 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/startup_byt.c
The file was modifiedruntime/dynlink.c
Commit 6e1b3d18a001bf4b3cfd0d1c961725f498210c7a 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/caml/startup_aux.h
The file was modifiedruntime/startup_aux.c
The file was modifiedruntime/startup_byt.c
Commit 112118b0dcd2f02ed50625606c48260011ba23df 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/hashtbl.ml
The file was modifiedruntime/gc_ctrl.c
The file was modifiedruntime/startup_aux.c
The file was modifiedstdlib/.depend
The file was modifiedtestsuite/tests/backtrace/backtrace2.reference
The file was modifiedruntime/caml/gc_ctrl.h
Commit 26bbe0fcbaaf4059cf0d26a901d4466da5903b70 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 0b23ab72f0bb8527d7da954f5de30cb2b19854de 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 modifiedruntime/startup_byt.c
The file was modifiedruntime/gen_primsc.sh
The file was modifiedutils/clflags.mli
The file was modifiedbytecomp/bytesections.mli
The file was modifiedutils/clflags.ml
The file was modifiedbytecomp/bytelink.ml
The file was modifiedruntime/gc_ctrl.c
The file was modifieddriver/compenv.mli
The file was modifiedruntime/caml/startup_aux.h
The file was modifiedasmcomp/cmm_helpers.ml
The file was modified.depend
The file was modifiedasmcomp/cmm_helpers.mli
The file was modifiedmanual/src/cmds/runtime.etex
The file was modifiedasmcomp/asmlink.ml
The file was modifiedtools/objinfo.ml
The file was modifieddriver/maindriver.ml
The file was modifiedman/ocamlrun.1
The file was modifiedbytecomp/bytesections.ml
The file was modifiedChanges
The file was modifiedruntime/startup_aux.c
Commit 8703b35d487705133060886a77aefc34a40e3c85 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/testLinkModes.ml
Commit 48ead089925a57670c7e44e9802564b57f2093e1 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 138bf7b5a79041204249bb25dc12bfc7f3cf9184 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 modifieddriver/maindriver.ml
The file was modifiedruntime/startup_byt.c
Commit 7d0ce4b37174d1b667ce0ae714e824ea09a901bc 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 modifiedChanges
The file was modifiedotherlibs/Makefile.otherlibs.common
The file was modifiedtestsuite/tools/testLinkModes.ml
The file was modifiedotherlibs/unix/Makefile
Commit da9db14aa23d5e7574d8bd59208468bf113db91b 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 modifiedtestsuite/tools/testToplevel.ml
The file was modifiedotherlibs/systhreads/Makefile
The file was modifiedotherlibs/systhreads/st_stubs.c
The file was modifiedChanges
The file was modifiedtestsuite/tools/testDynlink.ml
Commit e4a775afbe17d59e1f73f1c154e3b7fd8f8d065e 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 modifiedtestsuite/tools/testLinkModes.ml
The file was modifiedChanges
The file was modifiedutils/ccomp.ml
Commit 84b9f1c278e41e7c0442c1de48cf6b3bb2abdd79 by david.allsopp
Use entrypoint flexdll branch

Fixes loading unix.cmxs in Cygwin64
The file was modifiedflexdll
The file was modifiedtestsuite/tools/testDynlink.ml
The file was modifiedtools/ci/inria/main
The file was modifiedtestsuite/tools/testToplevel.ml
Commit 56f52170451278786de3a12571d1c0e58317932e 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 modifiedtestsuite/tools/testRelocation.ml
The file was modified.gitignore
The file was modified.depend
The file was modifiedMakefile
Commit 10a0fddf518721653344fc01443880415ac8f9ce by david.allsopp
Use clang-cl for flexdll support objects
The file was modifiedtestsuite/tools/toolchain.ml
The file was modifiedMakefile
Commit baf60face3fcaa7fdf2ba43853a1fb31c37a94fc by david.allsopp
Two minor clean-ups in the in-prefix-tests

Dead code in the Makefile and the less-trodden path in
Test_ld_conf.ensure_dir contained an obvious incorrect function call...
The file was modifiedtestsuite/in_prefix/Makefile.test
The file was modifiedtestsuite/tools/test_ld_conf.ml
Commit a68c290ef0c1d772d9b1e25bfbc509f1c5d92418 by david.allsopp
Add caml_output_value_with_compat primitive

Alternate version of caml_output_value which returns a boolean
indicating if the result was 32-bit compatible and would have succeeded
if Compat_32 had been included in the flags.
The file was modifiedruntime/extern.c
Commit 0b7a36e2b843c30fc3e7cc1bafcff44ba485cadd by david.allsopp
Split Meta into two

All the functions in Meta are now only required by the toplevel, however
two of them are still quite tangled up with Symtable. Begin the process
of disentanglement by moving those two functions to Symtable and the
remaining ones directly to the bytecode toplevel (Dynlink already has
its own implementations).
The file was modifiedotherlibs/dynlink/byte/dynlink_symtable.ml
The file was modifiedtoplevel/byte/topeval.ml
The file was modifiedtestsuite/tests/tool-toplevel/pr6468.compilers.reference
The file was modifiedMakefile
The file was removedbytecomp/meta.mli
The file was modifiedbytecomp/symtable.ml
The file was modifiedtoplevel/byte/trace.ml
The file was modified.depend
The file was removedbytecomp/meta.ml
The file was modifiedruntime/meta.c
The file was modifiedtestsuite/tests/tool-toplevel/pr9701.compilers.reference
Commit 04b46c57be198d5fdfd780296a07c3940bdb6862 by david.allsopp
Omit CRCS if caml_reify_bytecode isn't used

Bytecode images (including for -output-obj) now only include the CRCS
section if the image actually needs dynamic loading (which is identified
by the use of the caml_reify_bytecode primitive which is only used by
the toplevel and dynlink).
The file was modifiedbytecomp/bytelink.ml
Commit dde073e8cbbfde02fd163d6b2024f26eb9da4e73 by david.allsopp
Eliminate post-processing of bootstrap artefact

In order to be repeatable, the coreboot cycle routinely has to relink
both boot artefacts with a fixed configuration. It's not therefore much
more of a stretch to link those artefacts with the required flags to
suppress both the header (and RNTM section, if applicable) and debugging
information.

Combined with the previous change to suppress CRCS when the image
doesn't use dynamic loading, the coreboot cycle can be accomplished
without having to post-process the artefacts with stripdebug.
The file was modifiedMakefile
The file was modifiedboot/ocamlc
The file was modifiedboot/ocamllex
Commit c12fe94097ad7c87c16618fef40592d37ef6717f by david.allsopp
Fold-back into the test
The file was modifiedtestsuite/tools/testBytecodeBinaries.ml
The file was modifiedtestsuite/tools/harness.ml