Skip to content

Improve cross-platform ASM toolchain discovery and Apple Silicon / arm64 support - #2603

Open
JackTriton wants to merge 1 commit into
OoTRandomizer:Devfrom
JackTriton:arm64-build-support
Open

Improve cross-platform ASM toolchain discovery and Apple Silicon / arm64 support#2603
JackTriton wants to merge 1 commit into
OoTRandomizer:Devfrom
JackTriton:arm64-build-support

Conversation

@JackTriton

@JackTriton JackTriton commented Jul 12, 2026

Copy link
Copy Markdown

Improve cross-platform ASM toolchain discovery and Apple Silicon support

This PR updates the ASM build script to support the Apple Silicon n64 toolchain without changing the existing Windows, Linux, or Intel macOS workflows.

Before this, both of these need to be merged:

Changes

  • Add common MIPS toolchain discovery for:

    • project-local tools
    • OOTR_N64_PREFIX
    • standard Homebrew n64 prefixes
    • the system PATH
  • Place generated toolchain wrappers under the shared ASM/tools/toolchain directory.

  • Ensure GCC, assembler, linker, objdump, and objcopy are selected from the same toolchain prefix.

  • Add an isolated assembler launch environment on Apple Silicon to avoid interference from Conda, MacPorts, or inherited compiler variables.

  • Clear COMPILER_PATH and GCC_EXEC_PREFIX before invoking the toolchain.

  • Add optional mips64-g++ support.

  • Add:

python3 build.py --check-toolchains

This command reports the expected path, detected path, resolved path, version, ROM size, and GCC-selected assembler for every required file and executable.

  • Preserve existing build behavior on other platforms.
  • Support both the existing fixed payload layout and branches that use a configurable payload start, depending on the selected patch version.

Compatibility

The Apple Silicon-specific behavior is enabled only when running on Darwin arm64. Other platforms continue to use the existing direct tool execution path.

@fenhl fenhl added Component: ASM/C Changes some internals of the ASM/C libraries Status: Needs Review Someone should be looking at it Status: Needs Testing Probably should be tested Component: Documentation Affects user-facing help messages or public API docs Status: Blocked Waiting for something else to happen first Type: Maintenance Code style, infrastructure, updating dependencies labels Jul 12, 2026
@flagrama

Copy link
Copy Markdown

This just looks like slop to me. It doesn't even look like it even checks the PATH for a valid toolchain which is the default way to do it. The tools directory is there for people who don't know how to modify their PATH. I'm against even reviewing this because there is a clear lack of actual understanding of what is actually being done for randomizer and why.

Comment thread ASM/README.md
@@ -1,4 +1,4 @@
Advanced modifications to the Randomzier source require a bit more software than what is needed for running it.
Advanced modifications to the Randomizer source require a bit more software than what is needed for running it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only review I'll do is that the README file is so wordy as to be completely useless and ignored now. The readme should be the recommended path for each platform. Do not add a bunch of "do this or this" and "you can do this but it is optional". Create a new file for advanced concepts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: ASM/C Changes some internals of the ASM/C libraries Component: Documentation Affects user-facing help messages or public API docs Status: Blocked Waiting for something else to happen first Status: Needs Review Someone should be looking at it Status: Needs Testing Probably should be tested Type: Maintenance Code style, infrastructure, updating dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants