Chromium Code Reviews| 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/mac/tweak_info_plist.gni") | |
| 7 import("//build/util/version.gni") | 8 import("//build/util/version.gni") |
| 8 import("//chrome/version.gni") | 9 import("//chrome/version.gni") |
| 9 import("//testing/test.gni") | 10 import("//testing/test.gni") |
| 10 import("//url/features.gni") | 11 import("//url/features.gni") |
| 11 | 12 |
| 12 assert(!is_component_build, "Cronet requires static library build.") | 13 assert(!is_component_build, "Cronet requires static library build.") |
| 13 | 14 |
| 14 declare_args() { | 15 declare_args() { |
| 15 cronet_enable_data_reduction_proxy_support = false | 16 cronet_enable_data_reduction_proxy_support = false |
| 16 } | 17 } |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 46 "cronet_c_for_grpc.h", | 47 "cronet_c_for_grpc.h", |
| 47 "cronet_environment.cc", | 48 "cronet_environment.cc", |
| 48 "cronet_environment.h", | 49 "cronet_environment.h", |
| 49 ] | 50 ] |
| 50 | 51 |
| 51 if (!use_platform_icu_alternatives) { | 52 if (!use_platform_icu_alternatives) { |
| 52 deps += [ "//base:i18n" ] | 53 deps += [ "//base:i18n" ] |
| 53 } | 54 } |
| 54 } | 55 } |
| 55 | 56 |
| 57 # Tweak |info_plist| with current version and revision. | |
| 58 tweak_info_plist("cronet_framework_plist") { | |
| 59 info_plist = "Info.plist" | |
| 60 args = [ "--bundle_id=CRNT" ] | |
|
kapishnikov
2016/06/30 21:59:55
Usually bundle id has a domain-like structure. I w
mef
2016/07/01 14:10:08
Done.
| |
| 61 } | |
| 62 | |
| 63 # Compile plist into |output_name|. | |
| 64 ios_info_plist("cronet_info_plist") { | |
| 65 executable_name = "Cronet" | |
| 66 | |
| 67 output_name = "$root_out_dir/Cronet.framework/Info.plist" | |
|
mef
2016/06/30 21:29:06
Is there a way to avoid hardcoding output path?
Robert Sesek
2016/06/30 21:43:14
It doesn't look like the ios_framework_bundle has
mef
2016/07/01 14:10:08
I've followed Sylvain's suggestion, and it seemed
| |
| 68 info_plist_target = ":cronet_framework_plist" | |
| 69 } | |
| 70 | |
| 56 ios_framework_bundle("cronet_framework") { | 71 ios_framework_bundle("cronet_framework") { |
| 57 output_name = "Cronet" | 72 output_name = "Cronet" |
| 58 | 73 |
| 59 deps = [ | 74 deps = [ |
| 75 ":cronet_info_plist", | |
| 60 ":cronet_sources", | 76 ":cronet_sources", |
| 61 "//base", | 77 "//base", |
| 62 "//net:net", | 78 "//net:net", |
| 63 ] | 79 ] |
| 64 | 80 |
| 65 info_plist = "Info.plist" | |
| 66 | |
| 67 libs = [ "UIKit.Framework" ] | 81 libs = [ "UIKit.Framework" ] |
| 68 | 82 |
| 69 public_headers = [ | 83 public_headers = [ |
| 70 "Cronet.h", | 84 "Cronet.h", |
| 71 "cronet_c_for_grpc.h", | 85 "cronet_c_for_grpc.h", |
| 72 ] | 86 ] |
| 73 | 87 |
| 74 sources = [ | 88 sources = [ |
| 75 "Cronet.h", | 89 "Cronet.h", |
| 76 "Cronet.mm", | 90 "Cronet.mm", |
| 77 ] | 91 ] |
| 92 | |
| 93 configs -= [ "//build/config/compiler:default_symbols" ] | |
| 94 configs += [ "//build/config/compiler:symbols" ] | |
| 95 | |
| 96 ldflags = | |
| 97 [ "-Wl,-install_name,@loader_path/Frameworks/Cronet.framework/Cronet" ] | |
| 98 | |
| 99 # For release version generate a separate dSYM. | |
| 100 if (!is_debug) { | |
| 101 ldflags += [ "-Wcrl,strip,-x" ] | |
|
Robert Sesek
2016/06/30 21:43:15
Similarly, we handle stripping globally with enabl
mef
2016/07/01 14:10:08
If there is a better way via updating template, I'
| |
| 102 ldflags += [ "-Wcrl,dsym," + rebase_path(root_out_dir) ] | |
|
mef
2016/06/30 21:29:06
Is there a way to specify that this outputs Cronet
Robert Sesek
2016/06/30 21:43:15
On Mac at least, we handle dSYMs and stripping at
mef
2016/07/01 14:10:08
I've tried that, but it didn't work for ios_framew
Robert Sesek
2016/07/01 15:37:43
Sorry if I wasn't being clear; these aren't argume
mef
2016/07/01 16:02:35
That's very cool, I didn't realize that. I've trie
Robert Sesek
2016/07/01 16:50:28
Hmm, I guess I worked around the dSYM output issue
| |
| 103 } | |
| 78 } | 104 } |
| 79 | 105 |
| 80 bundle_data("cronet_test_bundle_data") { | 106 bundle_data("cronet_test_bundle_data") { |
| 81 testonly = true | 107 testonly = true |
| 82 sources = [ | 108 sources = [ |
| 83 "//net/data/ssl/certificates/quic_test.example.com.crt", | 109 "//net/data/ssl/certificates/quic_test.example.com.crt", |
| 84 "//net/data/ssl/certificates/quic_test.example.com.key", | 110 "//net/data/ssl/certificates/quic_test.example.com.key", |
| 85 "//net/data/ssl/certificates/quic_test.example.com.key.pkcs8", | 111 "//net/data/ssl/certificates/quic_test.example.com.key.pkcs8", |
| 86 "//net/data/ssl/certificates/quic_test.example.com.key.sct", | 112 "//net/data/ssl/certificates/quic_test.example.com.key.sct", |
| 87 ] | 113 ] |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 } | 172 } |
| 147 | 173 |
| 148 copy("cronet_package_copy") { | 174 copy("cronet_package_copy") { |
| 149 sources = [ | 175 sources = [ |
| 150 "$root_out_dir/Cronet.framework", | 176 "$root_out_dir/Cronet.framework", |
| 151 "//AUTHORS", | 177 "//AUTHORS", |
| 152 "//chrome/VERSION", | 178 "//chrome/VERSION", |
| 153 "//components/cronet/ios/Cronet.h", | 179 "//components/cronet/ios/Cronet.h", |
| 154 "//components/cronet/ios/cronet_c_for_grpc.h", | 180 "//components/cronet/ios/cronet_c_for_grpc.h", |
| 155 ] | 181 ] |
| 182 if (!is_debug) { | |
| 183 # sources += [ "$root_out_dir/Cronet.dSYM" ] | |
|
mef
2016/06/30 21:29:06
Is there a way to specify that Cronet.dSYM is gene
Robert Sesek
2016/06/30 21:43:15
The toolchain lists it as an output if based on th
mef
2016/07/01 14:10:08
The toolchain just adds it to outputs:
https://cs.
| |
| 184 } | |
| 156 outputs = [ | 185 outputs = [ |
| 157 "$_package_dir/{{source_file_part}}", | 186 "$_package_dir/{{source_file_part}}", |
| 158 ] | 187 ] |
| 159 | 188 |
| 160 deps = [ | 189 deps = [ |
| 161 ":cronet_framework", | 190 ":cronet_framework", |
| 162 ] | 191 ] |
| 163 } | 192 } |
| 164 | 193 |
| 165 group("cronet_package") { | 194 group("cronet_package") { |
| 166 deps = [ | 195 deps = [ |
| 167 ":cronet_package_copy", | 196 ":cronet_package_copy", |
| 168 ":generate_license", | 197 ":generate_license", |
| 169 ] | 198 ] |
| 170 } | 199 } |
| OLD | NEW |