Skip to content

[OCaml] Add (cross-)compiler shards #11146

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

topolarity
Copy link
Contributor

@topolarity topolarity commented May 8, 2025

I'm sure there's plenty that needs fixing here, but the main build is working at least. I also had to move to a pre-release of v5.4.0 since OCaml's cross-compiler support was only recently shored up in Dec 2024 (great timing for us!)

companion PR's: JuliaPackaging/BinaryBuilderBase.jl#425 and JuliaPackaging/BinaryBuilder.jl#1382


include("../common.jl")

name = "OCamlBase"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this should be OCaml or something else

Is there a convention?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I think for Go we just use "Go"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just "OCaml" sounds good to me.

It won't conflict with the OCaml_jll, will it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this isn't published as a regular JLL package, but only as a release in this repo. Note that you'll need to have BinaryBuilderBase deved in your environment, the script will modify your Artifacts.toml file.

Comment on lines +79 to +83
compiler_target = try
parse(Platform, ARGS[end])
catch
error("This is not a typical build_tarballs.jl! Must provide exactly one platform as the last argument!")
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted to go the GCC route and use the compiler target as the "target" for the build
(even though the toolchain we use during the build is the host toolchain for the most part, we do need both)

@topolarity
Copy link
Contributor Author

I noticed during this process that I also need to declare a runtime dependency on gcc (it is invoked by ocamlopt)

I don't know whether that's necessary for these shards, since that dependency should be handled pretty much automatically (unless someone specifically excludes the :c compiler I suppose), but it is needed for the JLL artifacts in O/OCaml/

@topolarity
Copy link
Contributor Author

I think I have most of the bones in-place here

@giordano should I start generating + uploading these shards, or is there something else to do first?

@giordano
Copy link
Member

Uhm, no, I think building and publishing the shards should be good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants