Chromium Code Reviews| Index: components/cronet/ios/BUILD.gn |
| diff --git a/components/cronet/ios/BUILD.gn b/components/cronet/ios/BUILD.gn |
| index 19ff7514cf2e3ed18404b4541d512bd9370e9519..2271903767f5c94411839a94f0d78454f8062cdc 100644 |
| --- a/components/cronet/ios/BUILD.gn |
| +++ b/components/cronet/ios/BUILD.gn |
| @@ -4,6 +4,7 @@ |
| import("//build/buildflag_header.gni") |
| import("//build/config/ios/rules.gni") |
| +import("//build/mac/tweak_info_plist.gni") |
| import("//build/util/version.gni") |
| import("//chrome/version.gni") |
| import("//testing/test.gni") |
| @@ -53,17 +54,30 @@ source_set("cronet_sources") { |
| } |
| } |
| +# Tweak |info_plist| with current version and revision. |
| +tweak_info_plist("cronet_framework_plist") { |
| + info_plist = "Info.plist" |
| + 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.
|
| +} |
| + |
| +# Compile plist into |output_name|. |
| +ios_info_plist("cronet_info_plist") { |
| + executable_name = "Cronet" |
| + |
| + 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
|
| + info_plist_target = ":cronet_framework_plist" |
| +} |
| + |
| ios_framework_bundle("cronet_framework") { |
| output_name = "Cronet" |
| deps = [ |
| + ":cronet_info_plist", |
| ":cronet_sources", |
| "//base", |
| "//net:net", |
| ] |
| - info_plist = "Info.plist" |
| - |
| libs = [ "UIKit.Framework" ] |
| public_headers = [ |
| @@ -75,6 +89,18 @@ ios_framework_bundle("cronet_framework") { |
| "Cronet.h", |
| "Cronet.mm", |
| ] |
| + |
| + configs -= [ "//build/config/compiler:default_symbols" ] |
| + configs += [ "//build/config/compiler:symbols" ] |
| + |
| + ldflags = |
| + [ "-Wl,-install_name,@loader_path/Frameworks/Cronet.framework/Cronet" ] |
| + |
| + # For release version generate a separate dSYM. |
| + if (!is_debug) { |
| + 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'
|
| + 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
|
| + } |
| } |
| bundle_data("cronet_test_bundle_data") { |
| @@ -153,6 +179,9 @@ copy("cronet_package_copy") { |
| "//components/cronet/ios/Cronet.h", |
| "//components/cronet/ios/cronet_c_for_grpc.h", |
| ] |
| + if (!is_debug) { |
| + # 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.
|
| + } |
| outputs = [ |
| "$_package_dir/{{source_file_part}}", |
| ] |