Commit 3f45c2d2 authored by sdefresne's avatar sdefresne Committed by Commit bot

Add flag to control whether cronet is build on iOS.

Compiling cronet requires particular flags and it is advised to use the
helper script components/cronet/tools/cr_cronet.py to prepare the build
so add a gn flag to control whether cronet is build on iOS.

Due to the specific flags, the compilation of cronet is sometimes broken
on the downstream iOS bots causing unnecessary churn as cronet is unused
by Chrome on iOS.

BUG=640686

Review-Url: https://codereview.chromium.org/2312963002
Cr-Commit-Position: refs/heads/master@{#417301}
parent b29fa388
......@@ -79,12 +79,14 @@ def main():
if is_os:
target_os = 'ios'
test_target = 'cronet_test'
gn_args = 'target_cpu = "x64" '
gn_args = 'is_cronet_build=true is_component_build=false '
gn_extra = '--ide=xcode'
out_dir_suffix = '-iphonesimulator'
if options.iphoneos:
gn_args = 'target_cpu = "arm64" '
gn_args += ' target_cpu="arm64" '
out_dir_suffix = '-iphoneos'
else:
gn_args += ' target_cpu="x64" '
out_dir_suffix = '-iphonesimulator'
else:
target_os = 'android'
test_target = 'cronet_test_instrumentation_apk'
......
......@@ -2,38 +2,47 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
assert(!is_component_build, "component build is unsupported on iOS")
declare_args() {
# Control whether cronet is build (this is usually set by the script
# components/cronet/tools/cr_cronet.py as cronet requires specific
# gn args to build correctly).
is_cronet_build = false
}
# This list all targets that needs to be build as part of "gn_all" on iOS.
# This list should generally only include executables, but since some code
# has not yet been upstreamed it will sometimes also include targets that
# are not used upstream to ensure they are not broken inadvertently.
group("all") {
testonly = true
deps = [
"//ios/chrome:ios_chrome_unittests",
"//ios/chrome/app",
"//ios/chrome/browser",
"//ios/chrome/common",
"//ios/chrome/common/physical_web",
"//ios/chrome/share_extension:packed_resources",
"//ios/chrome/today_extension:packed_resources",
"//ios/net:ios_net_unittests",
"//ios/public/provider/chrome/browser",
"//ios/public/provider/web",
"//ios/testing:ocmock_support_unittest",
"//ios/third_party/earl_grey",
"//ios/web:earl_grey_test_support",
"//ios/web:ios_web_inttests",
"//ios/web:ios_web_unittests",
"//ios/web/shell:ios_web_shell",
"//ios/web/shell/test:ios_web_shell_test_host",
]
if (!is_component_build) {
deps += [
if (is_cronet_build) {
deps = [
"//components/cronet/ios:cronet_package",
"//ios/crnet:crnet_framework",
"//ios/crnet/crnet_consumer",
"//ios/crnet/test:crnet_test",
]
} else {
deps = [
"//ios/chrome:ios_chrome_unittests",
"//ios/chrome/app",
"//ios/chrome/browser",
"//ios/chrome/common",
"//ios/chrome/common/physical_web",
"//ios/chrome/share_extension:packed_resources",
"//ios/chrome/today_extension:packed_resources",
"//ios/net:ios_net_unittests",
"//ios/public/provider/chrome/browser",
"//ios/public/provider/web",
"//ios/testing:ocmock_support_unittest",
"//ios/third_party/earl_grey",
"//ios/web:earl_grey_test_support",
"//ios/web:ios_web_inttests",
"//ios/web:ios_web_unittests",
"//ios/web/shell:ios_web_shell",
"//ios/web/shell/test:ios_web_shell_test_host",
]
}
}
......@@ -22,12 +22,13 @@
],
"gn_args": [
"additional_target_cpus=[\"x86\"]",
"is_component_build=false",
"disable_brotli_filter=true",
"disable_file_support=true",
"disable_ftp_support=true",
"enable_websockets=false",
"goma_dir=\"$(goma_dir)\"",
"is_component_build=false",
"is_cronet_build=true",
"target_cpu=\"x64\"",
"target_os=\"ios\"",
"use_platform_icu_alternatives=true"
......
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