Open jonahbeckford opened 2 years ago
Hi @jonahbeckford. I'm afraid that's currently not possible since the compiler names are hardcoded because for dependency resolution these have to be special-cased.
However, it should be possible to rework the code to e.g. allow overwriting the default name of the compiler and using the flags: compiler
field from OPAM to avoid having to hardcode ocaml-variants
and ocaml-base-compiler
in the base_packages
, which I think would be a solid improvement.
dkml-base-compiler is a new compiler package in the Opam repository. Among other things, it builds a cross-compiler for macOS (x86_64 + ARM64) and unofficially can build cross-compilers for Android (ARM32, etc.).
I can't figure out the command line options so that
dkml-base-compiler.4.12.1~v1.0.0
is used as the compiler duringopam monorepo lock
rather thanocaml-base-compiler.VERSION
.Context: For my own internal needs I have been using the dunified Opam repository but do not use the
opam monorepo
tools; instead I use Opam build command configuration so thatopam install .
usesdune -x darwin_arm64
to build every Opam package dependency. That style of cross-compilation may be too complicated for other people. So not only would I like others to useopam monorepo
withdkml-base-compiler
but I've got some "dkml-workflows" tooling I'll be releasing that will create "native" (including cross-compiled) artifacts on GitHub Actions.If needed, I have a Makefile that can be used to see the problems doing
opam monorepo lock
withdkml-base-compiler
:For now I'm hand editing the
.locked
file.