Compare commits

...

2 Commits

Author SHA1 Message Date
deepak1556
fc3d6bf56d chore: fix build 2025-12-05 00:28:14 +09:00
deepak1556
792dc5d1e2 chore: rm fix_export_zlib_symbols.patch in favor of gn argument 2025-12-04 12:56:01 +09:00
4 changed files with 37 additions and 23 deletions

View File

@@ -75,3 +75,6 @@ enable_linux_installer = false
# Disable "Save to Drive" feature in PDF viewer
enable_pdf_save_to_drive = false
# Export zlib symbols for native modules
zlib_symbols_visible = true

View File

@@ -53,7 +53,6 @@ worker_feat_add_hook_to_notify_script_ready.patch
chore_provide_iswebcontentscreationoverridden_with_full_params.patch
fix_properly_honor_printing_page_ranges.patch
export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch
fix_export_zlib_symbols.patch
web_contents.patch
webview_fullscreen.patch
extend_apply_webpreferences.patch
@@ -142,3 +141,4 @@ expose_referrerscriptinfo_hostdefinedoptionsindex.patch
chore_disable_protocol_handler_dcheck.patch
fix_check_for_file_existence_before_setting_mtime.patch
fix_linux_tray_id.patch
zlib_build_fix_zlib_symbols_visible_on_windows.patch

View File

@@ -1,22 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Mon, 1 Jun 2020 15:30:47 -0800
Subject: fix: export zlib symbols
This patch sets ZLIB_DLL so that we properly export zlib symbols.
diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn
index afd3e8cc0f38e95b3b04835b46bd1197a63b4ed1..652fa32d49de9f0c73777c0d4d99421f52e16b38 100644
--- a/third_party/zlib/BUILD.gn
+++ b/third_party/zlib/BUILD.gn
@@ -333,6 +333,10 @@ component("zlib") {
defines = []
deps = []
+ if (is_win) {
+ defines += [ "ZLIB_DLL" ]
+ }
+
if (!use_x86_x64_optimizations && !use_arm_neon_optimizations) {
# Apparently android_cronet bot builds with NEON disabled and
# we also should disable optimizations for iOS@x86 (a.k.a. simulator).

View File

@@ -0,0 +1,33 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Deepak Mohan <hop2deep@gmail.com>
Date: Fri, 5 Dec 2025 00:15:16 +0900
Subject: [zlib][build] Fix zlib_symbols_visible on windows
Followup to https://crrev.com/c/4322978, addresses
the following error when attempting to build with
zlib_symbols_visible=true on windows platform.
```
ERROR at //third_party/zlib/BUILD.gn:365:18: Item not found
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
^--------------------------------------------
You were trying to remove "//build/config/gcc:symbol_visibility_hidden"
from the list but it wasn't there.
```
Bug: 42203738
Change-Id: I51200141447386be14c0e6874548351f8ed3ed4f
diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn
index afd3e8cc0f38e95b3b04835b46bd1197a63b4ed1..ae176ae97702bac31657e57a85e571d22e7eda22 100644
--- a/third_party/zlib/BUILD.gn
+++ b/third_party/zlib/BUILD.gn
@@ -367,7 +367,7 @@ component("zlib") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
- if (zlib_symbols_visible) {
+ if (is_posix && zlib_symbols_visible) {
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
configs += [ "//build/config/gcc:symbol_visibility_default" ]
}