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..07dbb973043938eb70189100c1f374740ba3702a 100644 |
--- a/components/cronet/ios/cronet_consumer/BUILD.gn |
+++ b/components/cronet/ios/cronet_consumer/BUILD.gn |
@@ -4,27 +4,50 @@ |
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 = [ |
+ # TODO(mef): This dep is used to make #import <Cronet/Cronet.h> work. |
kapishnikov
2017/05/23 21:37:46
I think we should fix it. Linking two frameworks d
jzw1
2017/05/24 06:15:26
Might be related, but when I build this on device
mef
2017/05/24 21:36:59
Yes, I think it is a result of linking cronet_fram
mef
2017/05/24 21:36:59
I agree that it is not great, and will be happy to
|
+ # Fix cronet_static_framework to provide similar config. |
+ "//components/cronet/ios:cronet_framework+link", |
+ "//components/cronet/ios:cronet_static_framework", |
+ ] |
} |