Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Relocatable] 10: Use RuntimeID to suffix ocamlrun, shared runtimes and bytecode stub libraries #165

Open
wants to merge 5 commits into
base: runtime-id
Choose a base branch
from

Conversation

dra27
Copy link
Owner

@dra27 dra27 commented Sep 24, 2024

PR sits on #164

@dra27 dra27 added the relocatable PRs related to the Relocatable Compiler project label Sep 24, 2024
@dra27 dra27 force-pushed the runtime-suffixing branch 4 times, most recently from c736c55 to fcd8155 Compare September 26, 2024 19:35
@dra27 dra27 force-pushed the runtime-suffixing branch 2 times, most recently from 582bfd6 to 4a77ba6 Compare October 4, 2024 12:41
@dra27 dra27 force-pushed the runtime-suffixing branch 2 times, most recently from 003c7dd to 88ce74a Compare October 5, 2024 10:36
@dra27 dra27 force-pushed the runtime-suffixing branch 2 times, most recently from 7dfc495 to c04f4ab Compare October 7, 2024 14:24
@dra27 dra27 force-pushed the runtime-suffixing branch 2 times, most recently from f80118e to 0a4738b Compare October 15, 2024 08:25
@dra27 dra27 force-pushed the runtime-id branch 2 times, most recently from 53f6817 to 55d7d8e Compare October 15, 2024 12:39
@dra27 dra27 force-pushed the runtime-suffixing branch 2 times, most recently from e484e3f to 0a10451 Compare October 18, 2024 15:03
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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relocatable PRs related to the Relocatable Compiler project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant