#50297: fix: restore sdk_inputs cross-toolchain deps for macOS
Merged
Description of Change
Refs CL:7652975
The change in CL:7652975 restricted sdk_inputs public_deps to iOS only, to avoid setting up Xcode symlinks for the Linux toolchain when cross-building chrome/linux on Mac. However, this also broke cross-arch macOS builds (e.g. ffmpeg with target_cpu=x64) where the mig target in the clang_arm64 toolchain depends on sdk_inputs from the default clang_x64 toolchain.
Add target_os == "mac" alongside the existing iOS check to preserve the original intent while restoring the cross-toolchain dependency for macOS builds.
Failure
src on git:d39569110cdaa ❯ e d gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true use_siso=true $GN_EXTRA_ARGS"
Running "gn gen out/ffmpeg --args=import("//electron/build/args/ffmpeg.gn") use_remoteexec=true use_siso=true target_cpu="x64" v8_snapshot_toolchain="//build/toolchain/mac:clang_x64""
ERROR Input to target not generated by a dependency.
The file:
//out/ffmpeg/sdk/xcode_links/MacOSX26.2.sdk/usr/include/mach/exc.defs
is listed as an input or source for the target:
//third_party/crashpad/crashpad/util:mig(//build/toolchain/mac:clang_arm64)
but this file was not generated by any dependencies of the target. The target
that generates the file is:
//build/config/mac:sdk_inputs(//build/toolchain/mac:clang_x64)
ERROR Input to target not generated by a dependency.
The file:
//out/ffmpeg/sdk/xcode_links/MacOSX26.2.sdk/usr/include/mach/mach_exc.defs
is listed as an input or source for the target:
//third_party/crashpad/crashpad/util:mig(//build/toolchain/mac:clang_arm64)
but this file was not generated by any dependencies of the target. The target
that generates the file is:
//build/config/mac:sdk_inputs(//build/toolchain/mac:clang_x64)
ERROR Input to target not generated by a dependency.
The file:
//out/ffmpeg/sdk/xcode_links/MacOSX26.2.sdk/usr/include/mach/notify.defs
is listed as an input or source for the target:
//third_party/crashpad/crashpad/util:mig(//build/toolchain/mac:clang_arm64)
but this file was not generated by any dependencies of the target. The target
that generates the file is:
//build/config/mac:sdk_inputs(//build/toolchain/mac:clang_x64)
If you have generated inputs, there needs to be a dependency path between the
two targets in addition to just listing the files. For indirect dependencies,
the intermediate ones must be public_deps. data_deps don't count since they're
only runtime dependencies. If you think a dependency chain exists, it might be
because the chain is private. Try "gn path" to analyze.
3 generated input errors found.
ERROR Failed to run command:
Exit Code: "1"
- PR description included
-
npm testpasses - PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: none
Backports
42-x-y
MergedPR Number
#50303Merged At
Mar 16, 2026, 5:26:54 PM
Released In
v42.0.0-alpha.2Release Date
Mar 16, 2026, 7:09:29 PM
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