When building with portable lockdirs the ocaml compiler is built with `--disable-native-compiler`
Expected Behavior
Dune should build the ocaml compiler without the --disable-native-compiler flag on linux x86_64 and macos aarch64 (among other platforms).
Actual Behavior
When portable lockdirs is enabled, package solutions include the package ocaml-option-bytecode-only which causes the compiler to be built with the --disable-native-compiler flag.
Reproduction
I can repro this with https://github.com/gridbugs/llama/. Solve the project with a portable lockdir and then build the project with --verbose to learn the path to the compiler toolchain. Inspect the bin directory and confirm that ocamlopt is missing. Confirm that the solution includes the package ocaml-option-bytecode-only.
This happens because the ocaml-compiler.5.3.0 package has this dependency:
"ocaml-option-bytecode-only"
{arch != "arm64" & arch != "x86_64" & arch != "s390x" & arch != "riscv64" &
arch != "ppc64"}
By default dune solves with an unset sentinel value for arch in the hopes that that would make the solution more general. But if arch is set to a value other than the architectures in the above condition then ocaml will be built with --disable-native-compiler.
The fix is to change the default solver environments to include architectures arm64 and x86_64 as these are by far the most common.