mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: restore sdk_inputs cross-toolchain deps for macOS (#50303)
fix: restore sdk_inputs cross-toolchain deps for macOS 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. Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -149,3 +149,4 @@ fix_set_correct_app_id_on_linux.patch
|
||||
fix_pass_trigger_for_global_shortcuts_on_wayland.patch
|
||||
feat_plumb_node_integration_in_worker_through_workersettings.patch
|
||||
feat_restore_macos_child_plugin_process.patch
|
||||
fix_restore_sdk_inputs_cross-toolchain_deps_for_macos.patch
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Mon, 16 Mar 2026 18:57:00 +0100
|
||||
Subject: fix: restore sdk_inputs cross-toolchain deps for macOS
|
||||
|
||||
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.
|
||||
|
||||
We should try to upstream this.
|
||||
|
||||
diff --git a/build/config/mac/BUILD.gn b/build/config/mac/BUILD.gn
|
||||
index 56238a14ae8fb0a8fc9bba6553b99c199080e7af..22c628c3b4a3d1072b382ffc0fd0ce5bb85de9b5 100644
|
||||
--- a/build/config/mac/BUILD.gn
|
||||
+++ b/build/config/mac/BUILD.gn
|
||||
@@ -120,7 +120,8 @@ if (mac_use_xcode_symlinks && current_toolchain == default_toolchain) {
|
||||
}
|
||||
} else {
|
||||
group("sdk_inputs") {
|
||||
- if (current_toolchain != default_toolchain && target_os == "ios") {
|
||||
+ if (current_toolchain != default_toolchain &&
|
||||
+ (target_os == "ios" || target_os == "mac")) {
|
||||
public_deps = [ ":sdk_inputs($default_toolchain)" ]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user