Commit 0edcce33 authored by Misha Efimov's avatar Misha Efimov Committed by Commit Bot

[Cronet] Add cronet_package target for desktop platforms.

The cronet_package target packages cronet library, headers and license into $root_out_dir/cronet.
Disable histogram manager on Mac and Win platforms to reduce binary size.

Bug: 786559
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;master.tryserver.chromium.android:android_cronet_tester
Change-Id: I3f5ac065e405734260926ea774b9fa08efa4d060
Reviewed-on: https://chromium-review.googlesource.com/c/1255802
Commit-Queue: Misha Efimov <mef@chromium.org>
Reviewed-by: default avatarPaul Jensen <pauljensen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596311}
parent 05339fa3
...@@ -3,13 +3,17 @@ ...@@ -3,13 +3,17 @@
# found in the LICENSE file. # found in the LICENSE file.
import("//build/buildflag_header.gni") import("//build/buildflag_header.gni")
import("//build/toolchain/toolchain.gni")
import("//build/util/lastchange.gni")
import("//build/util/process_version.gni") import("//build/util/process_version.gni")
import("//build/util/version.gni") import("//build/util/version.gni")
import("//components/cronet/native/include/headers.gni")
import("//components/grpc_support/include/headers.gni")
import("//testing/test.gni") import("//testing/test.gni")
declare_args() { declare_args() {
# If set to true, this will remove histogram manager to reduce binary size. # If set to true, this will remove histogram manager to reduce binary size.
disable_histogram_support = false disable_histogram_support = is_mac || is_win
} }
# Disable histogram support is not allowed on Android. # Disable histogram support is not allowed on Android.
...@@ -170,4 +174,72 @@ if (!is_ios && !is_android) { ...@@ -170,4 +174,72 @@ if (!is_ios && !is_android) {
"run_all_unittests.cc", "run_all_unittests.cc",
] ]
} }
_package_dir = "$root_out_dir/cronet"
# Generate LICENSE file by recursively joining all dependent licenses.
action("generate_license") {
_license_path = "$_package_dir/LICENSE"
script = "//tools/licenses.py"
inputs = [
lastchange_file,
]
outputs = [
_license_path,
]
args = [
"license_file",
rebase_path(_license_path, root_build_dir),
"--gn-target",
"//components/cronet:cronet",
"--gn-out-dir",
".",
]
}
# Copy boiler-plate files into the package.
copy("cronet_package_copy") {
sources = [
"//AUTHORS",
"//chrome/VERSION",
]
outputs = [
"$_package_dir/{{source_file_part}}",
]
}
# Copy shared library adding the version to the file name.
copy("cronet_package_shlib") {
sources = [
"$root_out_dir/${shlib_prefix}cronet${shlib_extension}",
]
outputs = [
"$_package_dir/${shlib_prefix}cronet.${chrome_version_full}${shlib_extension}",
]
deps = [
":cronet",
]
}
# Copy headers.
copy("cronet_package_headers") {
sources = cronet_native_public_headers + grpc_public_headers
outputs = [
"$_package_dir/include/{{source_file_part}}",
]
}
group("cronet_package") {
deps = [
":cronet_package_copy",
":cronet_package_headers",
":cronet_package_shlib",
":generate_license",
]
}
} }
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "build/build_config.h" #include "build/build_config.h"
#include "components/cronet/cronet_global_state.h" #include "components/cronet/cronet_global_state.h"
#include "components/cronet/cronet_prefs_manager.h" #include "components/cronet/cronet_prefs_manager.h"
#include "components/cronet/histogram_manager.h"
#include "components/cronet/host_cache_persistence_manager.h" #include "components/cronet/host_cache_persistence_manager.h"
#include "components/cronet/url_request_context_config.h" #include "components/cronet/url_request_context_config.h"
#include "net/base/ip_address.h" #include "net/base/ip_address.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment