docs/apple_platform_linkers.md
Chromium defaults to LLVM's LLD linker for macOS and iOS builds, but supports opting into the Apple linker (ld-prime) for local macOS development.
Historically, Chromium migrated from Apple's legacy ld64 linker to LLD for both macOS and iOS builds to improve link times and unify the toolchain.
Recent benchmarks show that Apple's new linker (ld-prime) is faster than LLD for local macOS development (tracked by https://crbug.com/502338406). However, to maintain toolchain uniformity, control, and semantic equivalence across platforms, Chromium continues to default to LLD for all configurations. The Apple linker is supported as a developer-selectable opt-in.
use_lld = false in GN args. Supported only for local non-cross arm64 macOS development (ARM Mac) to get faster link times.Using LLD as the default linker offers several advantages:
use_lld = false in args.gn. Supported only for local non-cross arm64 macOS builds (ARM Mac) to improve link speed (yielding up to a 4-6x speedup depending on configuration). Note that ld-prime is not supported for Intel Macs (x86-64) as either a build host or build target (opt-in support is tracked in https://crbug.com/518652539), cross-compilation, or ThinLTO builds.We are committed to further improving LLD performance to close the speed gap with the Apple linker. We will continue to evaluate both linkers as they evolve.
If you want to work on LLD, follow this paragraph.
For simple cases, LLD's --reproduce=foo.tar flag / LLD_REPRODUCE=foo.tar env var is sufficient.
See the "Note to self" on LLVM bug 48657 for making a repro file that involves the full app and framework bundles.