mirror of
https://github.com/termux/termux-packages.git
synced 2025-11-01 14:58:55 +00:00
46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
From a19b6e917e60db489607cd88a34ddc2b03c9d570 Mon Sep 17 00:00:00 2001
|
|
From: Chongyun Lee <licy183@termux.dev>
|
|
Date: Sat, 23 Aug 2025 16:44:54 +0800
|
|
Subject: [PATCH] reland jumbo 13
|
|
|
|
Enable jumbo build for the following template(s):
|
|
|
|
- //third_party/protobuf/proto_library.gni -> template("proto_library")
|
|
|
|
---
|
|
third_party/protobuf/proto_library.gni | 13 +++++++++++--
|
|
1 file changed, 11 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/third_party/protobuf/proto_library.gni b/third_party/protobuf/proto_library.gni
|
|
index afd1bd8388..25481aba32 100644
|
|
--- a/third_party/protobuf/proto_library.gni
|
|
+++ b/third_party/protobuf/proto_library.gni
|
|
@@ -139,6 +139,7 @@ import("//build_overrides/protobuf.gni")
|
|
|
|
import("//build/config/compiler/compiler.gni")
|
|
import("//build/config/cronet/config.gni")
|
|
+import("//build/config/jumbo.gni")
|
|
import("//build/config/sanitizers/sanitizers.gni")
|
|
import("//build/toolchain/kythe.gni")
|
|
|
|
@@ -638,9 +639,17 @@ template("proto_library") {
|
|
(defined(invoker.component_build_force_source_set) &&
|
|
invoker.component_build_force_source_set && is_component_build)) {
|
|
# Option to disable building a library in component build.
|
|
- _library_type = "source_set"
|
|
+ _library_type = "jumbo_source_set"
|
|
} else {
|
|
- _library_type = "static_library"
|
|
+ _library_type = "jumbo_static_library"
|
|
+ }
|
|
+
|
|
+ if (defined(invoker.testonly) && invoker.testonly) {
|
|
+ if (_library_type == "jumbo_source_set") {
|
|
+ _library_type = "source_set"
|
|
+ } else if (_library_type == "jumbo_static_library") {
|
|
+ _library_type = "static_library"
|
|
+ }
|
|
}
|
|
|
|
# Build generated protobuf stubs as libary or source set.
|