WIP replace cli flag --prebuilt-platform
with --build-host
#6859
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is built on top of #6808, which should be merge first.
This PR makes progress towards decoupling roc from the host toolchains, by moving host rebuilding behind a compiler flag so it is no longer the default behaviour. It is still available where required using
--build-host
however will give a warning;I was originally working towards removing rebuilding in one go in #6696, however I realised this was a very large and difficult change due to the need to change all of the cli tests.
This PR achieves the same effect, effectively removing platform rebuilding from the cli for end users -- while keeping the cli tests as they are. This enables the cli tests to be adapted one by one instead of all at once. Once all of the tests have a build script, host rebuilding functionality can be entirely removed along with the associated dependencies.
Application authors who use a platform release from a URL package are not affected by this change. These users will continue to use a prebuilt platform.
Platform authors need to include a build script in their platform to build host binaries. This change will make running platform example less convenient if they are not using a URL release, as the platform binaries will need to be built first in a separate step. For example this workflow;
roc build.roc
using host toolchain e.g.cargo
orzig
roc examples/hello-world.roc