Skip to content

[erts] support cross-compilation and platform-specific toolchains#9

Merged
denbeigh2000 merged 5 commits intomainfrom
denbeigh/platform-independent-output
Apr 6, 2026
Merged

[erts] support cross-compilation and platform-specific toolchains#9
denbeigh2000 merged 5 commits intomainfrom
denbeigh/platform-independent-output

Conversation

@denbeigh2000
Copy link
Copy Markdown
Member

  • [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)
@denbeigh2000 denbeigh2000 merged commit 9ab9eb9 into main Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant