Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds proper support for cross-compiling Inko programs from one target to another. The Rust runtime is compiled ahead of time as part of the release process. These runtimes are managed using the `inko runtime` command. For musl we also include libunwind.a as this is needed to resolve linker symbol errors. The library is taken from the rustup musl toolchain to ensure it's the same version as Rust expects. This also saves us having to compile it in the first place. By default the compiler tries to detect what compiler/linker driver to use based on the target you're compiling for. For example, when targeting musl, the linker tries to use musl-gcc or musl-clang if it's installed. A custom linker can be specified using the --linker option. We also support linking using Zig, which makes it _much_ easier to target macOS and potentially other targets, provided you have Zig installed of course. This fixes #524. Changelog: added
- Loading branch information