mirror of
https://github.com/termux/termux-packages.git
synced 2025-06-03 17:45:16 +00:00
451 lines
14 KiB
Diff
451 lines
14 KiB
Diff
From 9a1892a20b13382d995f0ab6844a5655ee5946c0 Mon Sep 17 00:00:00 2001
|
|
From: Chongyun Lee <licy183@termux.dev>
|
|
Date: Wed, 16 Apr 2025 02:00:34 +0800
|
|
Subject: [PATCH] reland jumbo 2
|
|
|
|
Enable jumbo build for the following component(s)/source_set(s):
|
|
|
|
- //crypto:crypto
|
|
- //dbus:dbus
|
|
- //gin:gin
|
|
- //google_apis:google_apis
|
|
- //google_apis/gcm:gcm
|
|
- //headless:headless_non_renderer
|
|
- //ipc:ipc
|
|
- //ipc:message_support
|
|
- //sql:sql
|
|
- //url:url
|
|
|
|
---
|
|
crypto/BUILD.gn | 3 ++-
|
|
crypto/unexportable_key.cc | 4 +++
|
|
crypto/user_verifying_key.cc | 4 +++
|
|
dbus/BUILD.gn | 3 ++-
|
|
gin/BUILD.gn | 6 ++++-
|
|
gin/per_isolate_data.cc | 2 +-
|
|
google_apis/BUILD.gn | 3 ++-
|
|
.../gaia/oauth2_access_token_fetcher_impl.cc | 6 +++++
|
|
google_apis/gaia/oauth2_mint_token_flow.cc | 6 +++++
|
|
google_apis/gcm/BUILD.gn | 3 ++-
|
|
...nstance_id_delete_token_request_handler.cc | 14 ++++++++++
|
|
.../gcm/engine/unregistration_request.cc | 26 +++++++++++++++++++
|
|
headless/BUILD.gn | 6 ++++-
|
|
ipc/BUILD.gn | 5 ++--
|
|
ipc/ipc_sync_channel.cc | 4 +++
|
|
ipc/ipc_sync_message_filter.cc | 4 +++
|
|
sql/BUILD.gn | 3 ++-
|
|
url/BUILD.gn | 3 ++-
|
|
18 files changed, 94 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn
|
|
index 9f76eb9cc0..f98bc22479 100644
|
|
--- a/crypto/BUILD.gn
|
|
+++ b/crypto/BUILD.gn
|
|
@@ -3,6 +3,7 @@
|
|
# found in the LICENSE file.
|
|
|
|
import("//build/buildflag_header.gni")
|
|
+import("//build/config/jumbo.gni")
|
|
import("//components/nacl/toolchain.gni")
|
|
import("//crypto/features.gni")
|
|
import("//testing/test.gni")
|
|
@@ -12,7 +13,7 @@ buildflag_header("buildflags") {
|
|
flags = [ "USE_NSS_CERTS=$use_nss_certs" ]
|
|
}
|
|
|
|
-component("crypto") {
|
|
+jumbo_component("crypto") {
|
|
output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto.
|
|
sources = [
|
|
"aead.cc",
|
|
diff --git a/crypto/unexportable_key.cc b/crypto/unexportable_key.cc
|
|
index 88fba4f13e..cb0bd640e6 100644
|
|
--- a/crypto/unexportable_key.cc
|
|
+++ b/crypto/unexportable_key.cc
|
|
@@ -7,6 +7,8 @@
|
|
#include "base/check.h"
|
|
#include "base/functional/bind.h"
|
|
|
|
+#define g_mock_provider g_mock_provider_unexportable_key
|
|
+
|
|
namespace crypto {
|
|
|
|
namespace {
|
|
@@ -92,3 +94,5 @@ void SetUnexportableKeyProviderForTesting(
|
|
|
|
} // namespace internal
|
|
} // namespace crypto
|
|
+
|
|
+#undef g_mock_provider
|
|
diff --git a/crypto/user_verifying_key.cc b/crypto/user_verifying_key.cc
|
|
index 279a7a1431..668fd49c77 100644
|
|
--- a/crypto/user_verifying_key.cc
|
|
+++ b/crypto/user_verifying_key.cc
|
|
@@ -6,6 +6,8 @@
|
|
|
|
#include "base/check.h"
|
|
|
|
+#define g_mock_provider g_mock_provider_user_verifying_key
|
|
+
|
|
namespace crypto {
|
|
|
|
namespace {
|
|
@@ -94,3 +96,5 @@ void SetUserVerifyingKeyProviderForTesting(
|
|
} // namespace internal
|
|
|
|
} // namespace crypto
|
|
+
|
|
+#undef g_mock_provider
|
|
diff --git a/dbus/BUILD.gn b/dbus/BUILD.gn
|
|
index 5cca90ac7c..105d4c4ce0 100644
|
|
--- a/dbus/BUILD.gn
|
|
+++ b/dbus/BUILD.gn
|
|
@@ -3,13 +3,14 @@
|
|
# found in the LICENSE file.
|
|
|
|
import("//build/config/features.gni")
|
|
+import("//build/config/jumbo.gni")
|
|
import("//build/config/ui.gni")
|
|
import("//testing/test.gni")
|
|
import("//third_party/protobuf/proto_library.gni")
|
|
|
|
assert(use_dbus)
|
|
|
|
-component("dbus") {
|
|
+jumbo_component("dbus") {
|
|
sources = [
|
|
"bus.cc",
|
|
"bus.h",
|
|
diff --git a/gin/BUILD.gn b/gin/BUILD.gn
|
|
index f01c47bd51..7f3f4cf7c7 100644
|
|
--- a/gin/BUILD.gn
|
|
+++ b/gin/BUILD.gn
|
|
@@ -6,11 +6,12 @@ if (is_android) {
|
|
import("//build/config/android/rules.gni")
|
|
}
|
|
import("//base/allocator/partition_allocator/partition_alloc.gni")
|
|
+import("//build/config/jumbo.gni")
|
|
import("//testing/test.gni")
|
|
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
|
|
import("//v8/gni/v8.gni")
|
|
|
|
-component("gin") {
|
|
+jumbo_component("gin") {
|
|
sources = [
|
|
"arguments.cc",
|
|
"arguments.h",
|
|
@@ -78,6 +79,9 @@ component("gin") {
|
|
"wrappable.h",
|
|
"wrapper_info.cc",
|
|
]
|
|
+ jumbo_excluded_sources = [
|
|
+ "converter.cc", # Fail to compile
|
|
+ ]
|
|
|
|
if (use_partition_alloc) {
|
|
sources += [
|
|
diff --git a/gin/per_isolate_data.cc b/gin/per_isolate_data.cc
|
|
index 5bd5ed3a93..10777d497a 100644
|
|
--- a/gin/per_isolate_data.cc
|
|
+++ b/gin/per_isolate_data.cc
|
|
@@ -41,7 +41,7 @@ namespace gin {
|
|
|
|
PerIsolateData::PerIsolateData(
|
|
Isolate* isolate,
|
|
- ArrayBuffer::Allocator* allocator,
|
|
+ v8::ArrayBuffer::Allocator* allocator,
|
|
IsolateHolder::AccessMode access_mode,
|
|
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
|
scoped_refptr<base::SingleThreadTaskRunner> user_visible_task_runner,
|
|
diff --git a/google_apis/BUILD.gn b/google_apis/BUILD.gn
|
|
index 64d9c9bbf5..f894a4efe9 100644
|
|
--- a/google_apis/BUILD.gn
|
|
+++ b/google_apis/BUILD.gn
|
|
@@ -5,6 +5,7 @@
|
|
import("//build/buildflag_header.gni")
|
|
import("//build/config/chrome_build.gni")
|
|
import("//build/config/features.gni")
|
|
+import("//build/config/jumbo.gni")
|
|
import("//extensions/buildflags/buildflags.gni")
|
|
import("//google_apis/config.gni")
|
|
import("//testing/test.gni")
|
|
@@ -94,7 +95,7 @@ config("key_defines") {
|
|
}
|
|
}
|
|
|
|
-component("google_apis") {
|
|
+jumbo_component("google_apis") {
|
|
sources = [
|
|
"api_key_cache.cc",
|
|
"api_key_cache.h",
|
|
diff --git a/google_apis/gaia/oauth2_access_token_fetcher_impl.cc b/google_apis/gaia/oauth2_access_token_fetcher_impl.cc
|
|
index 11d498455e..caed44a8d7 100644
|
|
--- a/google_apis/gaia/oauth2_access_token_fetcher_impl.cc
|
|
+++ b/google_apis/gaia/oauth2_access_token_fetcher_impl.cc
|
|
@@ -26,6 +26,9 @@
|
|
#include "services/network/public/cpp/simple_url_loader.h"
|
|
#include "services/network/public/mojom/url_response_head.mojom.h"
|
|
|
|
+#define kAccessTokenKey kAccessTokenKey_Access
|
|
+#define kExpiresInKey kExpiresInKey_Access
|
|
+
|
|
namespace {
|
|
|
|
constexpr char kGetAccessTokenBodyFormat[] =
|
|
@@ -471,3 +474,6 @@ bool OAuth2AccessTokenFetcherImpl::ParseGetAccessTokenFailureResponse(
|
|
|
|
return true;
|
|
}
|
|
+
|
|
+#undef kAccessTokenKey
|
|
+#undef kExpiresInKey
|
|
diff --git a/google_apis/gaia/oauth2_mint_token_flow.cc b/google_apis/gaia/oauth2_mint_token_flow.cc
|
|
index 6361e728cb..efad3f97bc 100644
|
|
--- a/google_apis/gaia/oauth2_mint_token_flow.cc
|
|
+++ b/google_apis/gaia/oauth2_mint_token_flow.cc
|
|
@@ -38,6 +38,9 @@
|
|
#include "net/http/http_status_code.h"
|
|
#include "services/network/public/mojom/url_response_head.mojom.h"
|
|
|
|
+#define kAccessTokenKey kAccessTokenKey_Mint
|
|
+#define kExpiresInKey kExpiresInKey_Mint
|
|
+
|
|
namespace {
|
|
|
|
constexpr char kValueFalse[] = "false";
|
|
@@ -686,3 +689,6 @@ OAuth2MintTokenFlow::GetNetworkTrafficAnnotationTag() {
|
|
}
|
|
})");
|
|
}
|
|
+
|
|
+#undef kAccessTokenKey
|
|
+#undef kExpiresInKey
|
|
diff --git a/google_apis/gcm/BUILD.gn b/google_apis/gcm/BUILD.gn
|
|
index 9529e50d10..69d8ebffcc 100644
|
|
--- a/google_apis/gcm/BUILD.gn
|
|
+++ b/google_apis/gcm/BUILD.gn
|
|
@@ -2,10 +2,11 @@
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
+import("//build/config/jumbo.gni")
|
|
import("//testing/test.gni")
|
|
import("//third_party/protobuf/proto_library.gni")
|
|
|
|
-component("gcm") {
|
|
+jumbo_component("gcm") {
|
|
sources = [
|
|
"base/gcm_constants.cc",
|
|
"base/gcm_constants.h",
|
|
diff --git a/google_apis/gcm/engine/instance_id_delete_token_request_handler.cc b/google_apis/gcm/engine/instance_id_delete_token_request_handler.cc
|
|
index 787a63648d..a791ec85d8 100644
|
|
--- a/google_apis/gcm/engine/instance_id_delete_token_request_handler.cc
|
|
+++ b/google_apis/gcm/engine/instance_id_delete_token_request_handler.cc
|
|
@@ -10,6 +10,13 @@
|
|
#include "base/strings/string_number_conversions.h"
|
|
#include "google_apis/gcm/base/gcm_util.h"
|
|
|
|
+#define kGMSVersionKey kGMSVersionKey_InstanceIDDeleteTokenRequestHandler
|
|
+#define kSenderKey kSenderKey_InstanceIDDeleteTokenRequestHandler
|
|
+#define kInstanceIDKey kInstanceIDKey_InstanceIDDeleteTokenRequestHandler
|
|
+#define kScopeKey kScopeKey_InstanceIDDeleteTokenRequestHandler
|
|
+#define kExtraScopeKey kExtraScopeKey_InstanceIDDeleteTokenRequestHandler
|
|
+#define kTokenPrefix kTokenPrefix_InstanceIDDeleteTokenRequestHandler
|
|
+
|
|
namespace gcm {
|
|
|
|
namespace {
|
|
@@ -61,3 +68,10 @@ InstanceIDDeleteTokenRequestHandler::ParseResponse(
|
|
}
|
|
|
|
} // namespace gcm
|
|
+
|
|
+#undef kGMSVersionKey
|
|
+#undef kSenderKey
|
|
+#undef kInstanceIDKey
|
|
+#undef kScopeKey
|
|
+#undef kExtraScopeKey
|
|
+#undef kTokenPrefix
|
|
diff --git a/google_apis/gcm/engine/unregistration_request.cc b/google_apis/gcm/engine/unregistration_request.cc
|
|
index c9a605d451..26c759fcad 100644
|
|
--- a/google_apis/gcm/engine/unregistration_request.cc
|
|
+++ b/google_apis/gcm/engine/unregistration_request.cc
|
|
@@ -25,6 +25,19 @@
|
|
#include "services/network/public/cpp/simple_url_loader.h"
|
|
#include "services/network/public/mojom/url_response_head.mojom.h"
|
|
|
|
+#define kRequestContentType kRequestContentType_UnRegistrationRequest
|
|
+#define kCategoryKey kCategoryKey_UnRegistrationRequest
|
|
+#define kSubtypeKey kSubtypeKey_UnRegistrationRequest
|
|
+#define kDeleteKey kDeleteKey_UnRegistrationRequest
|
|
+#define kDeleteValue kDeleteValue_UnRegistrationRequest
|
|
+#define kDeviceIdKey kDeviceIdKey_UnRegistrationRequest
|
|
+#define kLoginHeader kLoginHeader_UnRegistrationRequest
|
|
+#define kErrorPrefix kErrorPrefix_UnRegistrationRequest
|
|
+#define kInvalidParameters kInvalidParameters_UnRegistrationRequest
|
|
+#define kInternalServerError kInternalServerError_UnRegistrationRequest
|
|
+#define kDeviceRegistrationError kDeviceRegistrationError_UnRegistrationRequest
|
|
+#define GetStatusFromError GetStatusFromError_UnRegistrationRequest
|
|
+
|
|
namespace gcm {
|
|
|
|
namespace {
|
|
@@ -294,3 +307,16 @@ void UnregistrationRequest::OnURLLoadComplete(
|
|
}
|
|
|
|
} // namespace gcm
|
|
+
|
|
+#undef kRequestContentType
|
|
+#undef kCategoryKey
|
|
+#undef kSubtypeKey
|
|
+#undef kDeleteKey
|
|
+#undef kDeleteValue
|
|
+#undef kDeviceIdKey
|
|
+#undef kLoginHeader
|
|
+#undef kErrorPrefix
|
|
+#undef kInvalidParameters
|
|
+#undef kInternalServerError
|
|
+#undef kDeviceRegistrationError
|
|
+#undef GetStatusFromError
|
|
diff --git a/headless/BUILD.gn b/headless/BUILD.gn
|
|
index 18636003d3..bd123b47c1 100644
|
|
--- a/headless/BUILD.gn
|
|
+++ b/headless/BUILD.gn
|
|
@@ -4,6 +4,7 @@
|
|
|
|
import("//build/config/c++/c++.gni")
|
|
import("//build/config/chrome_build.gni")
|
|
+import("//build/config/jumbo.gni")
|
|
import("//build/config/python.gni")
|
|
import("//build/util/lastchange.gni")
|
|
import("//build/util/process_version.gni")
|
|
@@ -233,7 +234,7 @@ static_library("backend_cdp_bindings") {
|
|
}
|
|
|
|
# Code that is not needed in a renderer process.
|
|
-component("headless_non_renderer") {
|
|
+jumbo_component("headless_non_renderer") {
|
|
sources = [
|
|
"lib/browser/command_line_handler.cc",
|
|
"lib/browser/command_line_handler.h",
|
|
@@ -301,6 +302,9 @@ component("headless_non_renderer") {
|
|
"public/internal/value_conversions.h",
|
|
"public/switches.h",
|
|
]
|
|
+ jumbo_excluded_sources = [
|
|
+ "lib/utility/headless_content_utility_client.cc", # Conflict with //headless:headless_shell_lib
|
|
+ ]
|
|
|
|
configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
|
|
|
diff --git a/ipc/BUILD.gn b/ipc/BUILD.gn
|
|
index eef379f12b..2951557735 100644
|
|
--- a/ipc/BUILD.gn
|
|
+++ b/ipc/BUILD.gn
|
|
@@ -4,6 +4,7 @@
|
|
|
|
import("//build/buildflag_header.gni")
|
|
import("//build/config/features.gni")
|
|
+import("//build/config/jumbo.gni")
|
|
import("//build/config/nacl/config.gni")
|
|
import("//ipc/features.gni")
|
|
import("//mojo/public/tools/bindings/mojom.gni")
|
|
@@ -17,7 +18,7 @@ buildflag_header("ipc_buildflags") {
|
|
flags = [ "IPC_MESSAGE_LOG_ENABLED=$enable_ipc_logging" ]
|
|
}
|
|
|
|
-component("ipc") {
|
|
+jumbo_component("ipc") {
|
|
sources = [
|
|
# These are the param_traits sources needed by all platforms,
|
|
# including ios. The rest are added in a conditional block below.
|
|
@@ -107,7 +108,7 @@ component("ipc") {
|
|
}
|
|
}
|
|
|
|
-component("message_support") {
|
|
+jumbo_component("message_support") {
|
|
sources = [
|
|
"ipc_message.cc",
|
|
"ipc_message.h",
|
|
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
|
|
index fb8acffe22..de6a8a235d 100644
|
|
--- a/ipc/ipc_sync_channel.cc
|
|
+++ b/ipc/ipc_sync_channel.cc
|
|
@@ -34,6 +34,8 @@
|
|
|
|
using base::WaitableEvent;
|
|
|
|
+#define OnEventReady OnEventReadySyncChannel
|
|
+
|
|
namespace IPC {
|
|
|
|
namespace {
|
|
@@ -615,3 +617,5 @@ void SyncChannel::OnChannelInit() {
|
|
}
|
|
|
|
} // namespace IPC
|
|
+
|
|
+#undef OnEventReady
|
|
diff --git a/ipc/ipc_sync_message_filter.cc b/ipc/ipc_sync_message_filter.cc
|
|
index 15f66c849c..6114f78ca7 100644
|
|
--- a/ipc/ipc_sync_message_filter.cc
|
|
+++ b/ipc/ipc_sync_message_filter.cc
|
|
@@ -17,6 +17,8 @@
|
|
#include "mojo/public/cpp/bindings/associated_receiver.h"
|
|
#include "mojo/public/cpp/bindings/sync_handle_registry.h"
|
|
|
|
+#define OnEventReady OnEventReadySyncMessageFilter
|
|
+
|
|
namespace IPC {
|
|
|
|
namespace {
|
|
@@ -199,3 +201,5 @@ void SyncMessageFilter::GetRemoteAssociatedInterface(
|
|
}
|
|
|
|
} // namespace IPC
|
|
+
|
|
+#undef OnEventReady
|
|
diff --git a/sql/BUILD.gn b/sql/BUILD.gn
|
|
index 24fa142672..145a9691b0 100644
|
|
--- a/sql/BUILD.gn
|
|
+++ b/sql/BUILD.gn
|
|
@@ -2,6 +2,7 @@
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
+import("//build/config/jumbo.gni")
|
|
import("//testing/test.gni")
|
|
import("//tools/metrics/generate_allowlist_from_histograms_file.gni")
|
|
|
|
@@ -13,7 +14,7 @@ generate_allowlist_from_histograms_file("sql_name_variants") {
|
|
allow_list_name = "DatabaseTag"
|
|
}
|
|
|
|
-component("sql") {
|
|
+jumbo_component("sql") {
|
|
sources = [
|
|
"database.cc",
|
|
"database.h",
|
|
diff --git a/url/BUILD.gn b/url/BUILD.gn
|
|
index 3051d7b4b4..e5f423f96c 100644
|
|
--- a/url/BUILD.gn
|
|
+++ b/url/BUILD.gn
|
|
@@ -3,6 +3,7 @@
|
|
# found in the LICENSE file.
|
|
|
|
import("//build/buildflag_header.gni")
|
|
+import("//build/config/jumbo.gni")
|
|
import("//testing/libfuzzer/fuzzer_test.gni")
|
|
import("//testing/test.gni")
|
|
import("features.gni")
|
|
@@ -19,7 +20,7 @@ buildflag_header("buildflags") {
|
|
flags = [ "USE_PLATFORM_ICU_ALTERNATIVES=$use_platform_icu_alternatives" ]
|
|
}
|
|
|
|
-component("url") {
|
|
+jumbo_component("url") {
|
|
sources = [
|
|
"gurl.cc",
|
|
"gurl.h",
|