Skip to content

Commit

Permalink
[ios] Add variable to not build //ios/... targets
Browse files Browse the repository at this point in the history
The WebRTC project wants to build ios_remoting_unittests to
check that they are not breaking it and can safely roll their
code into Chromium.

As the bots invoke ninja without target, all accessibles one
are built even if not needed. This means that WebRTC bots may
break when changes in //ios/{chrome,web} depends on changes
to the build environment (new version of Xcode, ...) even if
they don't need to build the target that depends on those
changes.

Change //ios:all to not add dependencies on //ios/{chrome,web}
when `ios_build_chrome = false` (which is required to build the
ios_remoting_unittests target). This will still build subset
of //ios required (such as //ios/net, ...) based on the real
dependencies of ios_remoting_unittests.

Set `ios_build_chrome = false` for WebRTC bots.

Bug: none
Change-Id: I9643f15c5c0aa3a2cd45590561e566347f84a003
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3195917
Commit-Queue: Sylvain Defresne <[email protected]>
Reviewed-by: Rohit Rao <[email protected]>
Cr-Commit-Position: refs/heads/main@{#926785}
  • Loading branch information
sdefresne authored and Chromium LUCI CQ committed Sep 30, 2021
1 parent 3b2fb7d commit 0e15172
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ios/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ group("all") {
deps = [ "//components/cronet/ios:cronet_package_ios" ]
} else if (is_webkit_only_build) {
deps = [ "//ios/third_party/webkit" ]
} else {
} else if (ios_build_chrome) {
deps = [
# List all the targets that need to be built on iOS by default.
"//ios/chrome/app:chrome",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"gn_args": [
"enable_run_ios_unittests_with_xctest=true",
"goma_dir=\"$(goma_dir)\"",
"ios_build_chrome=false",
"ios_enable_code_signing=false",
"ios_set_attributes_for_xcode_project_generation=false",
"ios_use_goma_rbe=true",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"gn_args": [
"enable_run_ios_unittests_with_xctest=true",
"goma_dir=\"$(goma_dir)\"",
"ios_build_chrome=false",
"ios_enable_code_signing=false",
"ios_set_attributes_for_xcode_project_generation=false",
"ios_use_goma_rbe=true",
Expand Down
5 changes: 5 additions & 0 deletions ios/features.gni
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ declare_args() {
# WebKit for mac but incorrectly setting `target_os="ios"`.
is_webkit_only_build = false

# Control whether //ios/chrome and //ios/web targets are build. This
# is used by bots from projects based on top of Chromium that want to
# only reuse shared code (//ios/net, //remoting/ios, ...).
ios_build_chrome = true

# Controls whether universal links are blocked from opening native apps
# when the user is browsing in off the record mode.
block_universal_links_in_off_the_record_mode = true
Expand Down

0 comments on commit 0e15172

Please sign in to comment.