Skip to content

feat(boot): generic config override#13916

Closed
Alizter wants to merge 1 commit intoocaml:mainfrom
Alizter:push-sxtqklltqlrq
Closed

feat(boot): generic config override#13916
Alizter wants to merge 1 commit intoocaml:mainfrom
Alizter:push-sxtqklltqlrq

Conversation

@Alizter
Copy link
Collaborator

@Alizter Alizter commented Mar 25, 2026

We introduce DUNE_BOOT__* variables to override ocamlc -config values that are used in the bootstrap. This allows dune to be configured for cross-compilation without having to hack around with the ocamlc detection.

We introduce DUNE_BOOT__* variables to override ocamlc -config values
that are used in the bootstrap. This allows dune to be configured for
cross-compilation without having to hack around with the ocamlc
detection.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@rgrinberg
Copy link
Member

Who is supposed to set these variables? More generally, I don't think it makes sense to have package specific cross compilation variables.

@Alizter
Copy link
Collaborator Author

Alizter commented Mar 25, 2026

I would like to cross-compile Dune to targets like mingw from linux. In order to do so I have to either trick the bootstrap ocamlc detection into detecting the cross compiler or I can set the exact values I want in a flexible manner.

The motivation for that in turn is to be able to distribute prebuilt Windows dune binaries.

@rgrinberg
Copy link
Member

How about just using the existing cross compilation we have?

@Alizter
Copy link
Collaborator Author

Alizter commented Mar 25, 2026

Sure, I suppose that's simpler.

@Alizter Alizter closed this Mar 25, 2026
@rgrinberg
Copy link
Member

Moreover, if it doesn't work or is somehow clunky, improving it will benefit all of our users and not just a single package.

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