0

Add/Update external Reclient build instructions

Bug: b/291868532
Change-Id: I54e6225ab01e12141957949d5c8c35b32e5062d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5159847
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Andrew Williams <awillia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1244750}
This commit is contained in:
Andrew Williams
2024-01-09 17:32:23 +00:00
committed by Chromium LUCI CQ
parent 653dcdbb92
commit 54da9cc2df
6 changed files with 82 additions and 11 deletions

@@ -161,6 +161,28 @@ non-WebView targets. This is also allowed for Monochrome, but only when not set
as the WebView provider. as the WebView provider.
*** ***
### Faster builds
This section contains some things you can change to speed up your builds,
sorted so that the things that make the biggest difference are first.
#### Use Reclient
*** note
**Warning:** If you are a Google employee, do not follow the instructions below.
See
[go/building-android-chrome#initialize-remote-execution-distributed-builds](https://goto.google.com/building-android-chrome#initialize-remote-execution-distributed-builds)
instead.
***
Chromium's build can be sped up significantly by using a remote execution system
compatible with [REAPI](https://github.com/bazelbuild/remote-apis). This allows
you to benefit from remote caching and executing many build actions in parallel
on a shared cluster of workers.
To use Reclient, follow the corresponding
[Linux build instructions](linux/build_instructions.md#use-reclient).
## Build Chromium ## Build Chromium
Build Chromium with Ninja using the command: Build Chromium with Ninja using the command:

@@ -139,6 +139,28 @@ $ gn gen --args='target_os="android" is_cast_android=true' out/Default
Also be aware that some scripts (e.g. `tombstones.py`, `adb_gdb.py`) Also be aware that some scripts (e.g. `tombstones.py`, `adb_gdb.py`)
require you to set `CHROMIUM_OUTPUT_DIR=out/Default`. require you to set `CHROMIUM_OUTPUT_DIR=out/Default`.
### Faster builds
This section contains some things you can change to speed up your builds,
sorted so that the things that make the biggest difference are first.
#### Use Reclient
*** note
**Warning:** If you are a Google employee, do not follow the instructions below.
See
[go/building-android-chrome#initialize-remote-execution-distributed-builds](https://goto.google.com/building-android-chrome#initialize-remote-execution-distributed-builds)
instead.
***
Chromium's build can be sped up significantly by using a remote execution system
compatible with [REAPI](https://github.com/bazelbuild/remote-apis). This allows
you to benefit from remote caching and executing many build actions in parallel
on a shared cluster of workers.
To use Reclient, follow the corresponding
[Linux build instructions](linux/build_instructions.md#use-reclient).
## Build cast\_shell\_apk ## Build cast\_shell\_apk
Build `cast_shell_apk` with Ninja using the command: Build `cast_shell_apk` with Ninja using the command:

@@ -136,6 +136,22 @@ You can also follow the manual instructions on the
[Mac page](../mac_build_instructions.md), but make sure you set the [Mac page](../mac_build_instructions.md), but make sure you set the
GN arg `target_os="ios"`. GN arg `target_os="ios"`.
### Faster builds
This section contains some things you can change to speed up your builds,
sorted so that the things that make the biggest difference are first.
#### Use Reclient
Google employees should use Reclient, a distributed compilation system. Detailed
information is available internally but the relevant gn arg is:
* `use_remoteexec = true`
Google employees can visit
[go/building-chrome-mac#using-remote-execution](https://goto.google.com/building-chrome-mac#using-remote-execution)
for more information. For external contributors, Reclient does not support iOS
builds.
## Building for device ## Building for device
To be able to build and run Chromium and the tests for devices, you need to To be able to build and run Chromium and the tests for devices, you need to

@@ -153,11 +153,12 @@ $ gn gen out/Default
This section contains some things you can change to speed up your builds, This section contains some things you can change to speed up your builds,
sorted so that the things that make the biggest difference are first. sorted so that the things that make the biggest difference are first.
#### Use reclient #### Use Reclient
*** note *** note
**Warning:** If you are a Google employee, do not follow the instructions below. **Warning:** If you are a Google employee, do not follow the instructions below.
See [go/chrome-linux-build#setup-remote-execution](http://go/chrome-linux-build#setup-remote-execution) See
[go/chrome-linux-build#setup-remote-execution](https://goto.google.com/chrome-linux-build#setup-remote-execution)
instead. instead.
*** ***
@@ -172,7 +173,7 @@ For contributors who have
RBE backend paid by Google. Note that reclient for external contributors is a RBE backend paid by Google. Note that reclient for external contributors is a
best-effort process. We do not guarantee when you will be invited. Reach out to best-effort process. We do not guarantee when you will be invited. Reach out to
[reclient-users@chromium.org](https://groups.google.com/a/chromium.org/g/reclient-users) [reclient-users@chromium.org](https://groups.google.com/a/chromium.org/g/reclient-users)
if you have some questions about reclient usages. if you have any questions about reclient usage.
To get started, you need access to an REAPI-compatible backend. The following To get started, you need access to an REAPI-compatible backend. The following
instructions assume that you received an invitation from Google to use instructions assume that you received an invitation from Google to use

@@ -154,6 +154,17 @@ in your args.gn to disable debug symbols altogether. This makes both full
rebuilds and linking faster (at the cost of not getting symbolized backtraces rebuilds and linking faster (at the cost of not getting symbolized backtraces
in gdb). in gdb).
#### Use Reclient
In addition, Google employees should use Reclient, a distributed compilation system.
Detailed information is available internally but the relevant gn arg is:
* `use_remoteexec = true`
Google employees can visit
[go/building-chrome-mac#using-remote-execution](https://goto.google.com/building-chrome-mac#using-remote-execution)
for more information. For external contributors, Reclient does not support Mac
builds.
#### CCache #### CCache
You might also want to [install ccache](ccache_mac.md) to speed up the build. You might also want to [install ccache](ccache_mac.md) to speed up the build.

@@ -242,20 +242,19 @@ local variable or type information. With `symbol_level = 0` there is no
source-level debugging but call stacks still have function names. Changing source-level debugging but call stacks still have function names. Changing
`symbol_level` requires recompiling everything. `symbol_level` requires recompiling everything.
When invoking ninja, specify 'chrome' as the target to avoid building all test
binaries as well.
#### Use Reclient #### Use Reclient
In addition, Google employees should use reclient, a distributed compilation system. In addition, Google employees should use Reclient, a distributed compilation system.
Detailed information is available internally but the relevant gn arg is: Detailed information is available internally but the relevant gn arg is:
* `use_remoteexec = true` * `use_remoteexec = true`
Google employees can visit Google employees can visit
[go/building-chrome-win#setup-remote-execution](http://go/building-chrome-win#setup-remote-execution) [go/building-chrome-win#setup-remote-execution](https://goto.google.com/building-chrome-win#setup-remote-execution)
for more information. for more information. For external contributors, Reclient does not support
Windows builds.
When invoking ninja, specify 'chrome' as the target to avoid building all test
binaries as well.
Still, builds will take many hours on many machines.
#### Use Goma (deprecated) #### Use Goma (deprecated)