mirror of
https://github.com/termux/termux-packages.git
synced 2025-11-01 14:58:55 +00:00
251 lines
9.5 KiB
Diff
Executable File
251 lines
9.5 KiB
Diff
Executable File
From b1278c48cacbc50311debe12e78c018998f9d822 Mon Sep 17 00:00:00 2001
|
|
From: Chongyun Lee <licy183@termux.dev>
|
|
Date: Sat, 23 Aug 2025 23:48:59 +0800
|
|
Subject: [PATCH] reland jumbo 14
|
|
|
|
Enable jumbo build for the following component(s)/source_set(s):
|
|
|
|
- //third_party/perfetto/src/shared_lib:shared_lib
|
|
- //third_party/perfetto/src/trace_processor/importers/common:common
|
|
- //third_party/perfetto/src/trace_processor/importers/memory_tracker:graph_processor
|
|
- //third_party/perfetto/src/trace_processor/importers/proto:minimal
|
|
- //third_party/perfetto/src/tracing:client_api_without_backends
|
|
- //third_party/perfetto/src/tracing/service:service
|
|
|
|
Enable jumbo build for the following template(s):
|
|
|
|
- //third_party/abseil-cpp/absl.gni -> template("absl_source_set")
|
|
- //third_party/perfetto/gn/perfetto_component.gni -> template("perfetto_component")
|
|
|
|
---
|
|
third_party/abseil-cpp/absl.gni | 3 ++-
|
|
third_party/abseil-cpp/absl/strings/numbers.cc | 3 +++
|
|
.../absl/time/internal/cctz/src/time_zone_posix.cc | 4 ++++
|
|
third_party/abseil-cpp/absl/time/time.cc | 4 ++++
|
|
third_party/perfetto/gn/perfetto_component.gni | 10 +++++++++-
|
|
third_party/perfetto/src/shared_lib/BUILD.gn | 3 ++-
|
|
.../src/trace_processor/importers/common/BUILD.gn | 3 ++-
|
|
.../trace_processor/importers/memory_tracker/BUILD.gn | 3 ++-
|
|
.../src/trace_processor/importers/proto/BUILD.gn | 3 ++-
|
|
third_party/perfetto/src/tracing/BUILD.gn | 3 ++-
|
|
third_party/perfetto/src/tracing/service/BUILD.gn | 3 ++-
|
|
11 files changed, 34 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/third_party/abseil-cpp/absl.gni b/third_party/abseil-cpp/absl.gni
|
|
index 48e1ce7838..1ae51fc0f5 100644
|
|
--- a/third_party/abseil-cpp/absl.gni
|
|
+++ b/third_party/abseil-cpp/absl.gni
|
|
@@ -17,6 +17,7 @@
|
|
# deps = [ ":bar" ]
|
|
# }
|
|
|
|
+import("//build/config/jumbo.gni")
|
|
import("//build_overrides/build.gni")
|
|
|
|
declare_args() {
|
|
@@ -24,7 +25,7 @@ declare_args() {
|
|
}
|
|
|
|
template("absl_source_set") {
|
|
- source_set(target_name) {
|
|
+ jumbo_source_set(target_name) {
|
|
if (defined(invoker.testonly) && invoker.testonly && !absl_build_tests) {
|
|
not_needed(invoker, "*")
|
|
} else {
|
|
diff --git a/third_party/abseil-cpp/absl/strings/numbers.cc b/third_party/abseil-cpp/absl/strings/numbers.cc
|
|
index a83fd2ca84..cbaff818f4 100644
|
|
--- a/third_party/abseil-cpp/absl/strings/numbers.cc
|
|
+++ b/third_party/abseil-cpp/absl/strings/numbers.cc
|
|
@@ -673,6 +673,7 @@ size_t numbers_internal::SixDigitsToBuffer(double d,
|
|
}
|
|
|
|
namespace {
|
|
+#define kAsciiToInt kAsciiToInt_Numbers
|
|
// Represents integer values of digits.
|
|
// Uses 36 to indicate an invalid character since we support
|
|
// bases up to 36.
|
|
@@ -1086,6 +1087,8 @@ inline bool safe_uint_internal(absl::string_view text,
|
|
}
|
|
return safe_parse_positive_int(text, base, value_p);
|
|
}
|
|
+
|
|
+#undef kAsciiToInt
|
|
} // anonymous namespace
|
|
|
|
namespace numbers_internal {
|
|
diff --git a/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc b/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc
|
|
index efea080470..d6480bce97 100644
|
|
--- a/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc
|
|
+++ b/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc
|
|
@@ -21,6 +21,8 @@
|
|
|
|
#include "absl/base/config.h"
|
|
|
|
+#define kDigits kDigits_TimeZonePosix
|
|
+
|
|
namespace absl {
|
|
ABSL_NAMESPACE_BEGIN
|
|
namespace time_internal {
|
|
@@ -157,3 +159,5 @@ bool ParsePosixSpec(const std::string& spec, PosixTimeZone* res) {
|
|
} // namespace time_internal
|
|
ABSL_NAMESPACE_END
|
|
} // namespace absl
|
|
+
|
|
+#undef kDigits
|
|
diff --git a/third_party/abseil-cpp/absl/time/time.cc b/third_party/abseil-cpp/absl/time/time.cc
|
|
index d983c12bb5..37d87ca0fe 100644
|
|
--- a/third_party/abseil-cpp/absl/time/time.cc
|
|
+++ b/third_party/abseil-cpp/absl/time/time.cc
|
|
@@ -46,6 +46,8 @@
|
|
|
|
namespace cctz = absl::time_internal::cctz;
|
|
|
|
+#define unix_epoch unix_epoch_time
|
|
+
|
|
namespace absl {
|
|
ABSL_NAMESPACE_BEGIN
|
|
|
|
@@ -505,3 +507,5 @@ struct tm ToTM(absl::Time t, absl::TimeZone tz) {
|
|
|
|
ABSL_NAMESPACE_END
|
|
} // namespace absl
|
|
+
|
|
+#undef unix_epoch
|
|
diff --git a/third_party/perfetto/gn/perfetto_component.gni b/third_party/perfetto/gn/perfetto_component.gni
|
|
index 3c40d5d03c..59dd9563a7 100644
|
|
--- a/third_party/perfetto/gn/perfetto_component.gni
|
|
+++ b/third_party/perfetto/gn/perfetto_component.gni
|
|
@@ -29,6 +29,8 @@ import("perfetto.gni")
|
|
# -DPERFETTO_ANDROID_ASYNC_SAFE_LOG. Once this is fixed re-enable the
|
|
# ODRChecker in tools/gen_android_bp.
|
|
|
|
+import("//build/config/jumbo.gni")
|
|
+
|
|
# The condition below really means: "is Bazel generator".
|
|
if (is_perfetto_build_generator && !perfetto_build_with_android) {
|
|
perfetto_component_type = "static_library"
|
|
@@ -37,7 +39,13 @@ if (is_perfetto_build_generator && !perfetto_build_with_android) {
|
|
}
|
|
|
|
template("perfetto_component") {
|
|
- target(perfetto_component_type, target_name) {
|
|
+ _component_type = perfetto_component_type
|
|
+ if (perfetto_component_type == "static_library") {
|
|
+ _component_type = "jumbo_static_library"
|
|
+ } else if (perfetto_component_type == "source_set") {
|
|
+ _component_type = "jumbo_source_set"
|
|
+ }
|
|
+ target(_component_type, target_name) {
|
|
forward_variables_from(invoker, "*")
|
|
if (perfetto_component_type == "static_library") {
|
|
# Mangle the name of the library putting the full path in it. In component
|
|
diff --git a/third_party/perfetto/src/shared_lib/BUILD.gn b/third_party/perfetto/src/shared_lib/BUILD.gn
|
|
index ee0aa497d0..2be9d78a9e 100644
|
|
--- a/third_party/perfetto/src/shared_lib/BUILD.gn
|
|
+++ b/third_party/perfetto/src/shared_lib/BUILD.gn
|
|
@@ -12,6 +12,7 @@
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
+import("//build/config/jumbo.gni")
|
|
import("../../gn/test.gni")
|
|
|
|
source_set("intern_map") {
|
|
@@ -26,7 +27,7 @@ source_set("intern_map") {
|
|
]
|
|
}
|
|
|
|
-source_set("shared_lib") {
|
|
+jumbo_source_set("shared_lib") {
|
|
deps = [
|
|
":intern_map",
|
|
"../../gn:default_deps",
|
|
diff --git a/third_party/perfetto/src/trace_processor/importers/common/BUILD.gn b/third_party/perfetto/src/trace_processor/importers/common/BUILD.gn
|
|
index e681db573c..898b5d3420 100644
|
|
--- a/third_party/perfetto/src/trace_processor/importers/common/BUILD.gn
|
|
+++ b/third_party/perfetto/src/trace_processor/importers/common/BUILD.gn
|
|
@@ -12,9 +12,10 @@
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
+import("//build/config/jumbo.gni")
|
|
import("../../../../gn/perfetto.gni")
|
|
|
|
-source_set("common") {
|
|
+jumbo_source_set("common") {
|
|
sources = [
|
|
"address_range.h",
|
|
"args_tracker.cc",
|
|
diff --git a/third_party/perfetto/src/trace_processor/importers/memory_tracker/BUILD.gn b/third_party/perfetto/src/trace_processor/importers/memory_tracker/BUILD.gn
|
|
index 0fc30b806f..9e4922399d 100644
|
|
--- a/third_party/perfetto/src/trace_processor/importers/memory_tracker/BUILD.gn
|
|
+++ b/third_party/perfetto/src/trace_processor/importers/memory_tracker/BUILD.gn
|
|
@@ -12,10 +12,11 @@
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
+import("//build/config/jumbo.gni")
|
|
import("../../../../gn/perfetto.gni")
|
|
import("../../../../gn/test.gni")
|
|
|
|
-source_set("graph_processor") {
|
|
+jumbo_source_set("graph_processor") {
|
|
deps = [ "../../../../gn:default_deps" ]
|
|
public_deps = [
|
|
"../../../../include/perfetto/base",
|
|
diff --git a/third_party/perfetto/src/trace_processor/importers/proto/BUILD.gn b/third_party/perfetto/src/trace_processor/importers/proto/BUILD.gn
|
|
index 6c193e9627..894070fe71 100644
|
|
--- a/third_party/perfetto/src/trace_processor/importers/proto/BUILD.gn
|
|
+++ b/third_party/perfetto/src/trace_processor/importers/proto/BUILD.gn
|
|
@@ -12,9 +12,10 @@
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
+import("//build/config/jumbo.gni")
|
|
import("../../../../gn/perfetto_cc_proto_descriptor.gni")
|
|
|
|
-source_set("minimal") {
|
|
+jumbo_source_set("minimal") {
|
|
sources = [
|
|
"active_chrome_processes_tracker.cc",
|
|
"active_chrome_processes_tracker.h",
|
|
diff --git a/third_party/perfetto/src/tracing/BUILD.gn b/third_party/perfetto/src/tracing/BUILD.gn
|
|
index 4bbfdf75a8..5529a09872 100644
|
|
--- a/third_party/perfetto/src/tracing/BUILD.gn
|
|
+++ b/third_party/perfetto/src/tracing/BUILD.gn
|
|
@@ -12,6 +12,7 @@
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
+import("//build/config/jumbo.gni")
|
|
import("../../gn/fuzzer.gni")
|
|
import("../../gn/perfetto.gni")
|
|
import("../../gn/test.gni")
|
|
@@ -69,7 +70,7 @@ source_set("common") {
|
|
|
|
# Base target for the client API. On its own doesn't provide any backend other
|
|
# than the unsupported one.
|
|
-source_set("client_api_without_backends") {
|
|
+jumbo_source_set("client_api_without_backends") {
|
|
deps = [
|
|
"../../include/perfetto/tracing/core",
|
|
"../../protos/perfetto/common:zero",
|
|
diff --git a/third_party/perfetto/src/tracing/service/BUILD.gn b/third_party/perfetto/src/tracing/service/BUILD.gn
|
|
index 24d894d709..933cfffdc4 100644
|
|
--- a/third_party/perfetto/src/tracing/service/BUILD.gn
|
|
+++ b/third_party/perfetto/src/tracing/service/BUILD.gn
|
|
@@ -12,11 +12,12 @@
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
+import("//build/config/jumbo.gni")
|
|
import("../../../gn/fuzzer.gni")
|
|
import("../../../gn/perfetto.gni")
|
|
import("../../../gn/test.gni")
|
|
|
|
-source_set("service") {
|
|
+jumbo_source_set("service") {
|
|
public_deps = [
|
|
"..:common",
|
|
"../../../include/perfetto/ext/base",
|