Skip to content

Add native linux/arm64 (aarch64) build support#28

Open
MT-GoCode wants to merge 4 commits into
tiliondev:mainfrom
MT-GoCode:arm64
Open

Add native linux/arm64 (aarch64) build support#28
MT-GoCode wants to merge 4 commits into
tiliondev:mainfrom
MT-GoCode:arm64

Conversation

@MT-GoCode

Copy link
Copy Markdown

Adds native linux/arm64 (aarch64) build support — currently listed as "in progress" on the roadmap. No prebuilt binary is shipped for arm64, so this lets it be built from source natively (e.g. AWS Graviton, or a Linux arm64 VM under Lima/QEMU on Apple Silicon).

What's here

  • build/args.arm64.gn — arm64 sibling of args.gn. Every stealth-relevant knob is identical; the only differences are architecture-bound: target_cpu = "arm64" and dropping the x86-only SSE/AVX baseline extra_cflags (which clang rejects on aarch64, and whose failure mode doesn't exist on ARM).
  • build/build.sh — selects the args file by host arch (aarch64args.arm64.gn); x64 behavior unchanged.
  • build/build-arm64.sh — full native aarch64 build. Chromium ships no aarch64-linux prebuilt clang or rust, so this builds clang from source (host gcc + lld), uses a rustup nightly matching Chromium's pinned rust date, and provisions arm64 node/gperf/cmake. It also handles the arm64-specific gaps: the missing gperf CIPD package, the x64-only node binary, bindgen's libclang/rustfmt, and a couple of clang-flag/rustc-version quirks.
  • build/apply-patches.sh — adds git apply --recount so a stale hunk header in patch 0005 still anchors; all 35 patches apply cleanly. Helps x64 too.
  • .gitignore — ignore the default .fortress-build/ workdir.

Notes

  • All C++ stealth patches are unchanged. They're architecture-neutral (JS fingerprint surfaces: navigator/screen/canvas/webgl/webaudio/webrtc/timezone/fonts) and apply as-is.
  • The change is additive and zero-risk to x64 — the arch selector defaults to the existing args.gn on non-arm hosts.
  • Verified end-to-end: the produced binary runs, loads pages, and applies the persona via --uxr-* on an aarch64 host. The build is deterministic — a clean-room run reproduced the binary bit-for-bit (identical sha256).

MT-GoCode and others added 2 commits July 19, 2026 12:47
Fortress ships linux/x64, win/x64, macOS — but no linux/arm64 (roadmap:
in progress). This adds native aarch64 build support so the patched, max-stealth
Chromium can be built and run on arm64 (e.g. Lima/QEMU on Apple Silicon).

- build/args.arm64.gn: arm64 sibling of args.gn. Every stealth knob is IDENTICAL;
  the only differences are architecture-bound: target_cpu="arm64" and dropping the
  x86-only SSE/AVX baseline cflags (-mno-avx/-mno-bmi/-mno-lzcnt/...), which clang
  rejects for aarch64 and which guard against an x86-only PA_CHECK failure mode.
  Chromium's default arm64 baseline (ARMv8-A) is already the broadest target.
- build/build.sh: pick args by host arch (aarch64 -> args.arm64.gn), ARGS_FILE
  override still honored.
- .gitignore: ignore the default .fortress-build/ workdir.

All 34 C++ stealth patches are architecture-neutral (JS fingerprint surfaces:
navigator/screen/canvas/webgl/webaudio/webrtc/timezone/fonts) and apply unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- build/build-arm64.sh: end-to-end native linux/arm64 build. Chromium ships no
  aarch64-linux prebuilt clang or rust, so this builds clang from source, uses a
  matching rustup nightly, and provisions arm64 node/gperf/cmake. Verified to
  reproduce the release binary bit-for-bit from a clean tree.
- build/apply-patches.sh: use 'git apply --recount' so a stale hunk header (0005)
  still anchors; all 35 patches apply cleanly. Helps x64 too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@MT-GoCode
MT-GoCode requested a review from arham766 as a code owner July 19, 2026 16:46
gclient sync pulls hundreds of deps and intermittently fails on busy git
mirrors / HTTP 429. Retry with backoff (each retry resumes) so a flaky network
doesn't abort the whole build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…compat

The native arm64 recipe built with use_sysroot=false, so chrome linked against
the build host's libraries (Ubuntu 24.04: glibc 2.39 / GCC 14). glibc symbol
versioning is forward-only, so that binary demanded GLIBC_2.38 / GCC_14.0 and
refused to load on older runtimes — e.g. Debian 12 "bookworm" (glibc 2.36),
where the loader bailed before main() (silent exit 1, no window).

Fix: build against Chromium's bundled arm64 sysroot (Debian bullseye, glibc
2.31) — use_sysroot=true, plus an explicit install-sysroot.py --arch=arm64
(runhooks skips it when host arch == target). The resulting binary caps at
GLIBC_2.25 / GCC_4.5, so it runs on Debian 11/12/13+ from one artifact. This
is how official Google Chrome arm64 Linux builds achieve broad-distro support.

No source or patch changes; all stealth patches unchanged. x64 build untouched
(it already uses the default amd64 sysroot). Verified: loads google.com over
CDP and projects the persona on an aarch64 host.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Arman-Luthra

Copy link
Copy Markdown
Member

we'll look over this over the next few days. appreciate the pr

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.

3 participants