| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
| 6 import("//build/config/ios/rules.gni") | 6 import("//build/config/ios/rules.gni") |
| 7 import("//build/config/mac/symbols.gni") | 7 import("//build/config/mac/symbols.gni") |
| 8 import("//build/mac/tweak_info_plist.gni") | 8 import("//build/mac/tweak_info_plist.gni") |
| 9 import("//build/util/process_version.gni") | 9 import("//build/util/process_version.gni") |
| 10 import("//build/util/version.gni") | 10 import("//build/util/version.gni") |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 if (!use_platform_icu_alternatives) { | 64 if (!use_platform_icu_alternatives) { |
| 65 deps += [ "//base:i18n" ] | 65 deps += [ "//base:i18n" ] |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 # Tweak |info_plist| with current version and revision. | 69 # Tweak |info_plist| with current version and revision. |
| 70 tweak_info_plist("tweak_cronet_plist") { | 70 tweak_info_plist("tweak_cronet_plist") { |
| 71 info_plist = "Info.plist" | 71 info_plist = "Info.plist" |
| 72 } | 72 } |
| 73 | 73 |
| 74 _deps = [ |
| 75 ":cronet_version_header", |
| 76 ":generate_accept_languages", |
| 77 "//base:base", |
| 78 "//components/grpc_support", |
| 79 "//components/metrics:metrics", |
| 80 "//components/metrics/proto:proto", |
| 81 "//components/prefs:prefs", |
| 82 "//ios/net:net", |
| 83 "//ios/web:user_agent", |
| 84 "//net", |
| 85 "//url", |
| 86 ] |
| 87 |
| 88 static_library("cronet_static") { |
| 89 deps = _deps |
| 90 |
| 91 visibility = [ ":*" ] |
| 92 |
| 93 include_dirs = [ "//components/grpc_support/include" ] |
| 94 |
| 95 public_deps = [ |
| 96 "//components/grpc_support", |
| 97 ] |
| 98 |
| 99 public_headers = [ |
| 100 "Cronet.h", |
| 101 "cronet_c_for_grpc.h", |
| 102 ] |
| 103 public_headers += grpc_public_headers |
| 104 |
| 105 sources = [ |
| 106 "../histogram_manager.cc", |
| 107 "../histogram_manager.h", |
| 108 "../stale_host_resolver.cc", |
| 109 "../stale_host_resolver.h", |
| 110 "../url_request_context_config.cc", |
| 111 "../url_request_context_config.h", |
| 112 "Cronet.h", |
| 113 "Cronet.mm", |
| 114 "cronet_c_for_grpc.h", |
| 115 "cronet_environment.h", |
| 116 "cronet_environment.mm", |
| 117 ] |
| 118 } |
| 119 |
| 74 ios_framework_bundle("cronet_framework") { | 120 ios_framework_bundle("cronet_framework") { |
| 75 output_name = "Cronet" | 121 output_name = "Cronet" |
| 76 info_plist_target = ":tweak_cronet_plist" | 122 info_plist_target = ":tweak_cronet_plist" |
| 77 | 123 |
| 78 deps = [ | 124 deps = [ |
| 79 ":cronet_sources", | 125 ":cronet_sources", |
| 80 "//base", | 126 "//base", |
| 81 "//net:net", | 127 "//net:net", |
| 82 ] | 128 ] |
| 83 | 129 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 script = "//components/cronet/tools/generate_accept_languages.py" | 174 script = "//components/cronet/tools/generate_accept_languages.py" |
| 129 args = [ | 175 args = [ |
| 130 rebase_path("$target_gen_dir"), | 176 rebase_path("$target_gen_dir"), |
| 131 rebase_path("//"), | 177 rebase_path("//"), |
| 132 ] | 178 ] |
| 133 outputs = [ | 179 outputs = [ |
| 134 "$target_gen_dir/accept_languages_table.h", | 180 "$target_gen_dir/accept_languages_table.h", |
| 135 ] | 181 ] |
| 136 } | 182 } |
| 137 | 183 |
| 184 # A static library which contains all dependencies of :cronet_static. |
| 185 static_library("deps_complete") { |
| 186 visibility = [ ":*" ] |
| 187 complete_static_lib = true |
| 188 deps = _deps |
| 189 } |
| 190 |
| 191 config("cronet_config") { |
| 192 libs = [ |
| 193 "$target_out_dir/libcronet.a", |
| 194 "UIKit.Framework", |
| 195 "CFNetwork.framework", |
| 196 "MobileCoreServices.framework", |
| 197 "Security.framework", |
| 198 "SystemConfiguration.framework", |
| 199 "resolv", |
| 200 ] |
| 201 } |
| 202 |
| 203 action("lib_cronet") { |
| 204 script = "//components/cronet/tools/hide_symbols.py" |
| 205 deps = [ |
| 206 ":cronet_static", |
| 207 ":deps_complete", |
| 208 ] |
| 209 outputs = [ |
| 210 "$target_out_dir/libcronet.a", |
| 211 "$target_out_dir/libcronet.o", |
| 212 ] |
| 213 args = [ |
| 214 "--input_libs", |
| 215 rebase_path("$target_out_dir/libcronet_static.a", root_build_dir), |
| 216 "--deps_lib", |
| 217 rebase_path("$target_out_dir/libdeps_complete.a", root_build_dir), |
| 218 "--output_obj", |
| 219 rebase_path("$target_out_dir/libcronet.o", root_build_dir), |
| 220 "--output_lib", |
| 221 rebase_path("$target_out_dir/libcronet.a", root_build_dir), |
| 222 "--current_cpu", |
| 223 current_cpu, |
| 224 ] |
| 225 |
| 226 public_configs = [ ":cronet_config" ] |
| 227 } |
| 228 |
| 138 if (additional_toolchains == [] || current_toolchain == default_toolchain) { | 229 if (additional_toolchains == [] || current_toolchain == default_toolchain) { |
| 139 _package_dir = "$root_out_dir/cronet" | 230 _package_dir = "$root_out_dir/cronet" |
| 140 | 231 |
| 141 action("generate_license") { | 232 action("generate_license") { |
| 142 _license_path = "$_package_dir/LICENSE" | 233 _license_path = "$_package_dir/LICENSE" |
| 143 | 234 |
| 144 script = "//components/cronet/tools/cronet_licenses.py" | 235 script = "//components/cronet/tools/cronet_licenses.py" |
| 145 inputs = [ | 236 inputs = [ |
| 146 "//build/util/LASTCHANGE", | 237 "//build/util/LASTCHANGE", |
| 147 "//buildtools/$host_os/gn", | 238 "//buildtools/$host_os/gn", |
| 148 ] | 239 ] |
| 149 outputs = [ | 240 outputs = [ |
| 150 _license_path, | 241 _license_path, |
| 151 ] | 242 ] |
| 152 args = [ | 243 args = [ |
| 153 "license", | 244 "license", |
| 154 rebase_path(_license_path, root_build_dir), | 245 rebase_path(_license_path, root_build_dir), |
| 155 "--gn", | 246 "--gn", |
| 156 "--gn-path", | 247 "--gn-path", |
| 157 rebase_path("//buildtools/$host_os/gn", root_build_dir), | 248 rebase_path("//buildtools/$host_os/gn", root_build_dir), |
| 158 ] | 249 ] |
| 159 } | 250 } |
| 160 | 251 |
| 161 copy("cronet_package_copy") { | 252 copy("cronet_package_copy") { |
| 162 sources = [ | 253 sources = [ |
| 163 "$root_out_dir/Cronet.framework", | 254 "$root_out_dir/Cronet.framework", |
| 255 "$target_out_dir/libcronet.a", |
| 164 "//AUTHORS", | 256 "//AUTHORS", |
| 165 "//chrome/VERSION", | 257 "//chrome/VERSION", |
| 166 ] | 258 ] |
| 167 outputs = [ | 259 outputs = [ |
| 168 "$_package_dir/{{source_file_part}}", | 260 "$_package_dir/{{source_file_part}}", |
| 169 ] | 261 ] |
| 170 | 262 |
| 171 deps = [ | 263 deps = [ |
| 172 ":cronet_framework", | 264 ":cronet_framework", |
| 265 ":lib_cronet", |
| 173 ] | 266 ] |
| 174 } | 267 } |
| 175 | 268 |
| 176 if (enable_dsyms) { | 269 if (enable_dsyms) { |
| 177 action("cronet_dsym_archive") { | 270 action("cronet_dsym_archive") { |
| 178 script = "//chrome/tools/build/mac/archive_symbols.py" | 271 script = "//chrome/tools/build/mac/archive_symbols.py" |
| 179 | 272 |
| 180 # These are the dSYMs that will be archived. The sources list must be | 273 # These are the dSYMs that will be archived. The sources list must be |
| 181 # the target outputs that correspond to the dSYMs (since a dSYM is a | 274 # the target outputs that correspond to the dSYMs (since a dSYM is a |
| 182 # directory it cannot be listed as a source file). The targets that | 275 # directory it cannot be listed as a source file). The targets that |
| (...skipping 20 matching lines...) Expand all Loading... |
| 203 } else { | 296 } else { |
| 204 group("cronet_dsym_archive") { | 297 group("cronet_dsym_archive") { |
| 205 } | 298 } |
| 206 } | 299 } |
| 207 | 300 |
| 208 group("cronet_package") { | 301 group("cronet_package") { |
| 209 deps = [ | 302 deps = [ |
| 210 ":cronet_dsym_archive", | 303 ":cronet_dsym_archive", |
| 211 ":cronet_package_copy", | 304 ":cronet_package_copy", |
| 212 ":generate_license", | 305 ":generate_license", |
| 306 "//components/cronet/ios/sample:cronet_sample", |
| 213 ] | 307 ] |
| 214 } | 308 } |
| 215 } | 309 } |
| OLD | NEW |