Skip to content

Commit

Permalink
build: simplify mas patches
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound committed Nov 16, 2022
1 parent 517225b commit cc93872
Show file tree
Hide file tree
Showing 15 changed files with 1,572 additions and 1,721 deletions.
10 changes: 1 addition & 9 deletions patches/chromium/.patches
Expand Up @@ -18,14 +18,7 @@ gtk_visibility.patch
sysroot.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
chrome_key_systems.patch
add_didinstallconditionalfeatures.patch
desktop_media_list.patch
Expand Down Expand Up @@ -123,4 +116,3 @@ fix_remove_caption-removing_style_call.patch
build_allow_electron_to_use_exec_script.patch
revert_use_accessibility_pkey_when_setting_page_access.patch
roll_clang_llvmorg-16-init-8189-g97196a2d-2.patch
build_only_use_the_mas_build_config_in_the_required_components.patch
17 changes: 1 addition & 16 deletions patches/chromium/build_gn.patch
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 818ac10ac12357702bab267d7d9fc2a720050624..091b1ae4b16771a5ec05cdeab6a1f281b2d9ccc5 100644
index 818ac10ac12357702bab267d7d9fc2a720050624..21841237347178d7720fd0b79f7799d471a3e31f 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 818ac10ac12357702bab267d7d9fc2a720050624..091b1ae4b16771a5ec05cdeab6a1f281
# 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.

Expand Up @@ -81,7 +81,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 3d2fbf9ae3ed9a7621ed54ad7da4e290781b8b60..c2c65f685e760248adf3efcc98e6c7a8f1f7e5fb 100644
index d4b7650a609d7f06a50d7b11b0b788b96ca68205..34a15cbb10861058c5ba46c9ac111c9de69800f9 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -137,6 +137,8 @@ viz_component("service") {
Expand Down
29 changes: 0 additions & 29 deletions patches/chromium/mas-cgdisplayusesforcetogray.patch

This file was deleted.

0 comments on commit cc93872

Please sign in to comment.