[erts] support cross-compilation and platform-specific toolchains#9
Merged
denbeigh2000 merged 5 commits intomainfrom Apr 6, 2026
Merged
Conversation
Member
denbeigh2000
commented
Apr 3, 2026
- [erts] fix up constraints around OTP toolchain
- [beam] cross-platform erlang/OTP compilation
- [misc] use external rules_cc
- erts: ensure we capture sysroot location before changing dir.
- adds platform constraints everywhere - stops probing for an external toolchain by default, remove default external registration (users must do this now, but doing it unconditionally means we *need* an external erl toolchain to do anything)
- adds cross-compilation support, so we can compile erlang/otp for other
platforms
- this totally rejigged how otp discovery works, now we need to
explicitly provide an `otp` to our container layer (as well as to
elixir, but that's not covered here)
- always use `make release` over `make install` during build
- we had to do a little "faking" to make this work, because OTP tries
really hard to avoid building the bootstrap OTP unnecessarily.
- however, if we want to write the compiled ERTS to cache and use it
on either system, we can't ever assume we'll be running on the local
system.
Needed for vanilla support for bazel 9+
also support using a single, host-specific OTP as the bootstrap OTP for either platform (it doesn't get included in the final output)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.