Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/ios/rules.gni") | 5 import("//build/config/ios/rules.gni") |
| 6 import("//ios/features.gni") | |
| 6 | 7 |
| 7 ios_app_bundle("cronet_consumer") { | 8 template("cronet_consumer_template") { |
| 8 info_plist = "cronet-consumer-Info.plist" | 9 _target_name = target_name |
| 9 | 10 |
| 11 ios_app_bundle(_target_name) { | |
| 12 info_plist = "cronet-consumer-Info.plist" | |
| 13 | |
| 14 deps = [ | |
| 15 "//base:base", | |
| 16 ] | |
| 17 | |
| 18 deps += invoker.deps | |
| 19 | |
| 20 sources = [ | |
| 21 "cronet_consumer_app_delegate.h", | |
| 22 "cronet_consumer_app_delegate.mm", | |
| 23 "cronet_consumer_view_controller.h", | |
| 24 "cronet_consumer_view_controller.m", | |
| 25 "main.mm", | |
| 26 ] | |
| 27 | |
| 28 forward_variables_from(invoker, | |
| 29 [ | |
| 30 "bundle_deps", | |
| 31 "cflags", | |
| 32 "ldflags", | |
| 33 ]) | |
| 34 | |
| 35 configs += [ "//build/config/compiler:enable_arc" ] | |
| 36 } | |
| 37 } | |
| 38 | |
| 39 cronet_consumer_template("cronet_consumer") { | |
| 10 deps = [ | 40 deps = [ |
| 11 "//base:base", | |
| 12 "//components/cronet/ios:cronet_framework+link", | 41 "//components/cronet/ios:cronet_framework+link", |
| 42 ] | |
| 43 bundle_deps = [ "//components/cronet/ios:cronet_framework+bundle" ] | |
| 44 } | |
| 13 | 45 |
| 14 # All shared libraries must have the sanitizer deps to properly link in | 46 # TODO(mef): Building "cronet_consumer_static" app with additional_target_cpus |
| 15 # asan mode (this target will be empty in other cases). | 47 # causes "cronet_static_framework" to build lipo_binary("libcronet") for |
| 16 "//build/config:exe_and_shlib_deps", | 48 # duplicate architecture (e.g. arm64+arm64) and breaks the build. |
| 17 ] | 49 if (!defined(additional_target_cpus)) { |
| 50 cronet_consumer_template("cronet_consumer_static") { | |
| 51 deps = [ | |
| 52 "//components/cronet/ios:cronet_static_framework", | |
| 53 ] | |
| 18 | 54 |
| 19 sources = [ | 55 cflags = [ |
|
mef
2017/06/02 16:26:17
What's a better way to add $root_out_dir/Static to
| |
| 20 "cronet_consumer_app_delegate.h", | 56 "-F", |
| 21 "cronet_consumer_app_delegate.mm", | 57 "Static", |
| 22 "cronet_consumer_view_controller.h", | 58 ] |
| 23 "cronet_consumer_view_controller.m", | |
| 24 "main.mm", | |
| 25 ] | |
| 26 | 59 |
| 27 bundle_deps = [ "//components/cronet/ios:cronet_framework+bundle" ] | 60 ldflags = [ |
| 28 | 61 "-F", |
| 29 configs += [ "//build/config/compiler:enable_arc" ] | 62 "Static", |
| 63 ] | |
| 64 } | |
| 30 } | 65 } |
| OLD | NEW |