Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: components/cronet/ios/cronet_consumer/BUILD.gn

Issue 2807283002: [Cronet] Build static libcronet.a for iOS with complete dependencies. (Closed)
Patch Set: Create cronet_consumer_template and use it for static and regular consumer. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/cronet/ios/cronet_consumer/BUILD.gn
diff --git a/components/cronet/ios/cronet_consumer/BUILD.gn b/components/cronet/ios/cronet_consumer/BUILD.gn
index 966057c455dd82796d8516e7b42c88d115dac48c..c0cfd1d53f3aa75195a5b78b699a2337e04e02a6 100644
--- a/components/cronet/ios/cronet_consumer/BUILD.gn
+++ b/components/cronet/ios/cronet_consumer/BUILD.gn
@@ -4,27 +4,47 @@
import("//build/config/ios/rules.gni")
-ios_app_bundle("cronet_consumer") {
- info_plist = "cronet-consumer-Info.plist"
+template("cronet_consumer_template") {
+ _target_name = target_name
- deps = [
- "//base:base",
- "//components/cronet/ios:cronet_framework+link",
+ ios_app_bundle(_target_name) {
+ info_plist = "cronet-consumer-Info.plist"
- # All shared libraries must have the sanitizer deps to properly link in
- # asan mode (this target will be empty in other cases).
- "//build/config:exe_and_shlib_deps",
- ]
+ deps = [
+ "//base:base",
- sources = [
- "cronet_consumer_app_delegate.h",
- "cronet_consumer_app_delegate.mm",
- "cronet_consumer_view_controller.h",
- "cronet_consumer_view_controller.m",
- "main.mm",
- ]
+ # All shared libraries must have the sanitizer deps to properly link in
+ # asan mode (this target will be empty in other cases).
+ "//build/config/sanitizers:deps",
+ ]
+ deps += invoker.deps
+
+ if (defined(invoker.bundle_deps)) {
+ bundle_deps = invoker.bundle_deps
+ }
+
+ sources = [
+ "cronet_consumer_app_delegate.h",
+ "cronet_consumer_app_delegate.mm",
+ "cronet_consumer_view_controller.h",
+ "cronet_consumer_view_controller.m",
+ "main.mm",
+ ]
+
+ configs += [ "//build/config/compiler:enable_arc" ]
+ }
+}
+
+cronet_consumer_template("cronet_consumer") {
+ deps = [
+ "//components/cronet/ios:cronet_framework+link",
+ ]
bundle_deps = [ "//components/cronet/ios:cronet_framework+bundle" ]
+}
- configs += [ "//build/config/compiler:enable_arc" ]
+cronet_consumer_template("cronet_consumer_static") {
+ deps = [
+ "//components/cronet/ios:cronet_hide",
+ ]
}

Powered by Google App Engine
This is Rietveld 408576698