Imagine large project built with CompiledObject: best in _oasis - because native code binaries are used for deployment. But during development it is much faster to build a bytecode target - this speeds up edit-compile-run cycle a lot. Unfortunately oasis makes it's choice at the configure state (whether to build byte or native binaries). So the proposal is to provide separate target to build bytecode binaries (without reconfiguring) regardless of what CompiledObject says. With ocamlbuild it is very easy - just change the invocation of ocamlbuild (actually I did that manually always, but nowadays I am using dynamic setup.ml and that won't work for obvious reasons).

Followup

You have to wait 1s for guessing is_native ? or to re-run ocaml-setup.ml --configure ?

Anyway, please remember the time it takes to run configure generated by autoconf -- we have a quite fast setup.ml with regard to this.

Although, this should be a 1 time setup when you are working on a project. So 1s is not big here.

Note that .cmxs generation is still buggy (don't know why) and is probably higher priority to fix to speedup compilation. I will also work on separating "-test" from "-build" to speedup generation of test (build only what is necessary to test, byte only if the test is byte only). That should probably offers you a good default options for edit-compile-test speed.