Chromium Code Reviews| Index: components/cronet/ios/BUILD.gn |
| diff --git a/components/cronet/ios/BUILD.gn b/components/cronet/ios/BUILD.gn |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..72d466f5bc35db9e415af5a7054ad2859662eaaa |
| --- /dev/null |
| +++ b/components/cronet/ios/BUILD.gn |
| @@ -0,0 +1,158 @@ |
| +# Copyright 2015 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +import("//build/buildflag_header.gni") |
| +import("//build/util/version.gni") |
| +import("//chrome/version.gni") |
| +import("//testing/test.gni") |
| +import("//url/features.gni") |
| + |
| +assert(!is_component_build, "Cronet requires static library build.") |
| + |
| +declare_args() { |
| + cronet_enable_data_reduction_proxy_support = false |
| +} |
| + |
| +process_version("cronet_version_header") { |
| + template_file = "//components/cronet/version.h.in" |
| + output = "$target_gen_dir/version.h" |
| + extra_args = [ |
| + "-e", |
| + "VERSION_FULL=\"%s.%s.%s.%s\" % (MAJOR,MINOR,BUILD,PATCH)", |
| + ] |
| +} |
| + |
| +source_set("cronet_static") { |
| + deps = [ |
| + ":cronet_version_header", |
| + "//components/metrics:metrics", |
| + "//components/metrics/proto:proto", |
| + "//net", |
| + "//url", |
| + ] |
| + |
| + sources = [ |
| + "../histogram_manager.cc", |
| + "../histogram_manager.h", |
| + "../url_request_context_config.cc", |
| + "../url_request_context_config.h", |
| + "Cronet.h", |
| + "Cronet.mm", |
| + "cronet_bidirectional_stream.cc", |
| + "cronet_bidirectional_stream.h", |
| + "cronet_c_for_grpc.cc", |
| + "cronet_c_for_grpc.h", |
| + "cronet_environment.cc", |
| + "cronet_environment.h", |
| + ] |
| + |
| + if (!use_platform_icu_alternatives) { |
| + deps += [ "//base:i18n" ] |
| + } |
| +} |
|
kapishnikov
2016/05/17 22:03:28
Should we add '-fvisibility=hidden' and '-fvisibil
mef
2016/05/18 16:46:18
Symbol visibility=hidden seems to be default:https
|
| + |
| +shared_library("libcronet") { |
|
kapishnikov
2016/05/17 22:03:28
I have renamed the target to 'libcronet_shered' in
mef
2016/05/18 16:46:18
Done.
|
| + sources = [ |
|
kapishnikov
2016/05/17 22:03:28
"cronet_static" already lists these sources. Do we
mef
2016/05/18 16:46:19
Done.
|
| + "Cronet.h", |
| + "Cronet.mm", |
| + "cronet_c_for_grpc.cc", |
| + "cronet_c_for_grpc.h", |
| + ] |
| + deps = [ |
| + ":cronet_static", |
| + "//base", |
| + "//net:net", |
| + ] |
| + libs = [ "UIKit.Framework" ] |
|
kapishnikov
2016/05/17 22:03:28
I wonder why we need UIKit.Framework? Will Foundat
mef
2016/05/18 16:46:19
I'm getting these errors without UIKit:
Undefined
kapishnikov
2016/05/18 17:23:01
I see. It is used in https://code.google.com/p/chr
|
| +} |
| + |
| +bundle_data("cronet_test_bundle_data") { |
| + testonly = true |
| + sources = [ |
| + "//net/data/ssl/certificates/quic_test.example.com.crt", |
| + "//net/data/ssl/certificates/quic_test.example.com.key", |
| + "//net/data/ssl/certificates/quic_test.example.com.key.pkcs8", |
| + "//net/data/ssl/certificates/quic_test.example.com.key.sct", |
| + ] |
| + outputs = [ |
| + "{{bundle_resources_dir}}/{{source_file_part}}", |
| + ] |
| +} |
| + |
| +test("cronet_test") { |
| + testonly = true |
| + sources = [ |
| + "test/cronet_bidirectional_stream_test.mm", |
| + "test/cronet_test_runner.mm", |
| + "test/quic_test_server.cc", |
| + "test/quic_test_server.h", |
| + ] |
| + |
| + deps = [ |
| + ":cronet_static", |
| + ":cronet_test_bundle_data", |
| + ":cronet_version_header", |
| + "//base", |
| + "//base:i18n", |
| + "//net", |
| + "//net:simple_quic_tools", |
| + "//net:test_support", |
| + "//third_party/icu", |
| + ] |
| +} |
| + |
| +test("cronet_unittests") { |
| + sources = [ |
| + "//components/cronet/histogram_manager_unittest.cc", |
| + "//components/cronet/run_all_unittests.cc", |
| + "//components/cronet/url_request_context_config_unittest.cc", |
| + ] |
| + |
| + deps = [ |
| + ":cronet_static", |
| + "//base", |
| + "//base/test:test_support", |
| + "//components/metrics", |
| + "//net", |
| + "//testing/gtest", |
| + ] |
| +} |
| + |
| +_package_dir = "$root_out_dir/cronet" |
| + |
| +action("generate_license") { |
| + _license_path = "$_package_dir/LICENSE" |
| + |
| + script = "//components/cronet/tools/cronet_licenses.py" |
| + outputs = [ |
| + _license_path, |
| + ] |
| + args = [ |
| + "license", |
| + rebase_path(_license_path, root_build_dir), |
| + "--gn", |
| + ] |
| +} |
| + |
| +copy("cronet_package_copy") { |
| + sources = [ |
| + "//AUTHORS", |
| + "//chrome/VERSION", |
| + "//components/cronet/ios/Cronet.h", |
| + "//components/cronet/ios/cronet_c_for_grpc.h", |
| + ] |
| + outputs = [ |
| + "$_package_dir/{{source_file_part}}", |
| + ] |
| + |
| + deps = [] |
| +} |
| + |
| +group("cronet_package") { |
| + deps = [ |
| + ":cronet_package_copy", |
| + ":cronet_static", |
| + ":generate_license", |
| + ] |
| +} |