Conversation
Unify the two executable header implementations (cherry picked from commit 076b435)
Relocatable OCaml - explicit-relative paths in `ld.conf` (cherry picked from commit 1e05f34)
Relocatable OCaml - `--with-relative-libdir` (cherry picked from commit cfbf210)
Fix detection of default arguments in configure (cherry picked from commit d315509)
Remove incorrect breaks in configure.ac (cherry picked from commit 1ecddf1)
boot/ocamlc doesn't yet support -set-runtime-default and %standard_library_default.
Misc.String.to_utf_8_seq was added in PR#14014 for the testsuite, but isn't part of the backport. It's only needed in Bytelink, so share it from there instead.
Relocatable OCaml - Searching and Suffixing (cherry picked from commit da60a2e)
Allow `Config.is_official_release` to be changed without bootstrap (cherry picked from commit c40b687)
dra27
force-pushed
the
relocatable-ocaml-5.4
branch
10 times, most recently
from
June 19, 2026 16:48
6a05d55 to
be815cc
Compare
dra27
force-pushed
the
relocatable-ocaml-5.4
branch
from
September 3, 2026 13:41
be815cc to
c0e9b5d
Compare
dra27
force-pushed
the
relocatable-ocaml-5.4
branch
from
September 5, 2026 08:41
ed7aed8 to
c0e9b5d
Compare
boot/ocamlc still uses the old runtime-launch-info format and doesn't yet support -launch-method or -runtime-search.
Config.shebangscripts was added in PR#14014 for the testsuite, but isn't part of the backport. Similarly, Bytelink.read_runtime_launch_info was exposed, only to be deleted as part of PR#14245, so the backport cuts out this intermediate step by temporarily copying Bytelink.read_runtime_launch_info, which therefore needs deleting here. Labelled tuples were introduced in OCaml 5.4, and by policy shouldn't be used in the compiler distribution itself, although the principal reason to remove them here is simply because they'd have to be removed in the OCaml 5.3 backport anyway!
- Byterntm removed from ocamlbytecomp and linked directly in
ocamlobjinfo (the test-in-prefix driver likewise links it directly)
- Cmm_helpers.emit_global_string_constant inlined into its single use in
Asmlink.make_startup_file
- Compenv.parse_runtime_parameter inlined into its single use in
Main_args and Compenv.fatalf consequently removed
- Config.as_is_cc moved to Toolchain.as_is_cc
- Config.target_{unix,win32,cygwin} removed and uses of
Config.target_win32 inlined
Virtually elimates changes to the runtime headers: - caml_parse_ld_conf (protected by CAML_INTERNALS) changes arguments, but this function was already checked for not being used outside the runtime as part of OCaml 5.5 - exec.h now includes <stdint.h> (protected by CAML_INTERNALS) - version.h now defines OCAML_RELEASE_NUMBER
In OCaml 5.5, the suffixing mode is enabled by default. For compatibility, the backports only enable this mode by default if --enable-runtime-search and/or --enable-runtime-search-target is specified (the usual validation rules for these flags still applies - i.e. --disable-suffixing is still prohibited if either --enable-runtime-search or --enable-runtime-search-target is specified)
Cmo_format.library.lib_dllibs is able to change type without a bootstrap because the bootstrap cycle never reads a .cma which has any entries for dllibs (it fundamentally can't, because that would imply a dependency on dynamic loading, which isn't permitted in ultra-portable bootstrap) However, the format absolutely cannot change without ultimately changing the cma magic number, which is non-trivial, because we don't normally change the magic numbers in maintenance releases, and the numbering scheme consequently doesn't reserve space for them. This is worked around instead by leaving Cmo_format.library unaltered and instead writing a _second_ list after the Cmo_format.library in the cma format. This list is guarded with the cma magic number, but written in reverse. If this magic number is present, then the list must follow and must be the same length as lib_dllibs. If the magic number is not present, then the suffixed member of each lib_dllibs is assumed to be false, which is used also used as an "optimisation" to avoid writing the extra list at all when none of entries have suffixed:true.
As with Cmo_format.library, the type of Cmx_format.unit_infos cannot change without changing the cmx and cmxa magic numbers, which is similarly awkward. The workaround here is slightly simpler, if also somewhat more devious. Cmx_format.unit_infos is handily a fully mutable record, meaning that there are few if any optimisation assumptions which will ever be made around it. For the compiler, the interface is altered to add Compilenv.needs_stdlib_location which takes a Cmx_format.unit_infos and "accesses" its ui_need_stdlib field. In parallel, Compilenv.write_unit_info gains an optional ui_need_stdlib argument which allows the field to be specified when a Cmx_format.unit_infos is written to a file. The devious part is that instead of writing a Cmx_format.unit_infos value, Compilenv.write_unit_info writes a tuple with one extra element for the ui_need_stdlib field to be added in. Compilenv.needs_stdlib_location looks to see if the Cmx_format.unit_infos it has been passed in fact contains an extra field in the block and, if it does, reads it.
Relocatable OCaml - to opam and beyond (cherry picked from commit f6c8af4)
Fix installation in opam with invalid `OCAMLTOP_INCLUDE_PATH` (cherry picked from commit 63b0c81)
Fix compiler cloning in the opam sandbox on macOS (cherry picked from commit 31d08a3)
Improve installation time in opam by shrinking the Git-generated source archives (cherry picked from commit 172b5c5)
dra27
force-pushed
the
relocatable-ocaml-5.4
branch
from
September 15, 2026 06:49
c0e9b5d to
8fa734e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.