Build/Firefox For Apple Arm
< Build
Jump to navigation
Jump to search
Building Firefox to run on Arm macOS machines is less straightforward than for x86-64 macOS machines.
Using these instructions, you can either build directly on an Arm macOS machine, or cross-compile from one that is x86-64.
Building on Arm macOS
- If you installed Rust with older instructions, start by uninstall rustup:
rustup self uninstall
- Install Rust via https://rustup.rs.
- Install Rosetta 2:
softwareupdate --install-rosetta
./mach bootstrap
doesn't work here, so we need to do some manual steps:./mach create-mach-environment
. Ignore the error../mach artifact toolchain --from-build macosx64-node
mv node ~/.mozbuild
./mach build
. It should take about 30 minutes on a DTK, or less than 20 minutes on a M1 Mac Mini or Macbook pro. If it takes more, ensure you have nothing else than node running as Intel (check the activity monitor during the build).
Building on x86-64 macOS
- Install Xcode >= 12.3 or corresponding Command Line Tools.
./mach bootstrap
rustup update
rustup target add aarch64-apple-darwin
- Create a
mozconfig
file at the top of your repository withac_add_options --target=aarch64
as the contents. ./mach build
./mach package
to create a.dmg
to copy to your Apple Silicon machine