Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: simplify mas patches #36368

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 1 addition & 9 deletions patches/chromium/.patches
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ pepper_plugin_support.patch
gtk_visibility.patch
resource_file_conflict.patch
scroll_bounce_flag.patch
mas_blink_no_private_api.patch
mas_no_private_api.patch
mas-cgdisplayusesforcetogray.patch
mas_disable_remote_layer.patch
mas_disable_remote_accessibility.patch
mas_disable_custom_window_frame.patch
mas_avoid_usage_of_private_macos_apis.patch
mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch
mas_avoid_private_macos_api_usage.patch.patch
add_didinstallconditionalfeatures.patch
desktop_media_list.patch
proxy_config_monitor.patch
Expand Down Expand Up @@ -111,7 +104,6 @@ fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch
preconnect_manager.patch
fix_remove_caption-removing_style_call.patch
build_allow_electron_to_use_exec_script.patch
build_only_use_the_mas_build_config_in_the_required_components.patch
chore_introduce_blocking_api_for_electron.patch
chore_patch_out_partition_attribute_dcheck_for_webviews.patch
expose_v8initializer_codegenerationcheckcallbackinmainthread.patch
Expand Down
17 changes: 1 addition & 16 deletions patches/chromium/build_gn.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,8 @@ Subject: build_gn.patch
These are variables we add to the root BUILDCONFIG so that they're available
everywhere, without having to import("//electron/.../flags.gni").

Additionally, we add the `:mas_build` config to every compiled file so that
the `MAS_BUILD` #define is available everywhere. This produces fewer patch
conflicts when upgrading than it would if we added a specific config dependency
only to those targets which had MAS_BUILD-relevant content in them. The
tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will
rebuild the entire tree.

diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 105e194dd1d4d4003736ce5cf963bc1290de669f..7f80b6fab53e62296351695429e3a6b9bb717300 100644
index 105e194dd1d4d4003736ce5cf963bc1290de669f..420a13c16741037cf81de817c1808603e3fe6490 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,9 @@ if (current_os == "") {
Expand All @@ -27,11 +20,3 @@ index 105e194dd1d4d4003736ce5cf963bc1290de669f..7f80b6fab53e62296351695429e3a6b9
# Set to enable the official build level of optimization. This has nothing
# to do with branding, but enables an additional level of optimization above
# release (!is_debug). This might be better expressed as a tri-state
@@ -352,6 +355,7 @@ default_compiler_configs = [
"//build/config/compiler/pgo:default_pgo_flags",
"//build/config/coverage:default_coverage",
"//build/config/sanitizers:default_sanitizer_flags",
+ "//electron/build/config:mas_build",
]

if (is_win) {

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 9e66224b5cdb17a12c447eb67e2b1066d949128e..53611e788cde9012ca566444e6c1ee05c99b921e 100644
index b0e2c1932e2d6e8a7d68b45dd2928b3a14e2afca..c5d018ae78b486ef4b3cc86a8091869f62aef534 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -143,6 +143,8 @@ viz_component("service") {
Expand Down