codebytere

#54233: build: read the macOS resource allowlist from the linked framework

Merged
Created: Sep 23, 2026, 9:07:40 AM
Merged: Sep 23, 2026, 6:17:23 PM
1 comments
Target: main

Description of Change

grit's --allowlist-support markers are __attribute__((used)), so on macOS every ui::AllowlistedResource<id> the framework references survives the link as a symbol; ICF folds the bodies, not the names (an official arm64 framework has ~5,400 of them on 5 addresses). The mac allowlist is now read back from the linked Electron Framework with llvm-nm - from the dSYM when the framework itself is stripped - instead of pseudo-linking the framework's inputs through a patched linker_driver.py, and the framework's bundle-only deps (paks, xibs, helper and dylib copies) move to bundle_deps so the locale repack can depend on the link without a cycle and without that bundle_data leaking to other consumers of the paks. Linux keeps the input-scan path.

That removes the linker_driver.py --collect-inputs-only mode and the tools/resources/ar.py archive handling from patches/chromium; what remains is the gcc_toolchain.gni assert admitting Linux and macOS (that file also declares the arg grit's markers key off, so mac still needs it), and the Linux half of that is https://chromium-review.googlesource.com/c/chromium/src/+/8360559.

Checklist

Release Notes

Notes: none

Backports

No Backports Requested

This pull request doesn't have any backports requested or created for older release branches.

What are backports?

Backports are copies of changes made to the main branch that are applied to older release branches. They ensure that bug fixes and important changes are available in maintained older versions of Electron.

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron