[ios] Add variable to not build //ios/... targets
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}
diff --git a/ios/features.gni b/ios/features.gni
index 6108440..3a220e6 100644
--- a/ios/features.gni
+++ b/ios/features.gni
@@ -7,6 +7,11 @@
# 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