Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5a5fb09

Browse files
[fuchsia] Update fuchsia instruction in Compiling-the-engine.md (#55365)
Behavior of `gclient config --custom-var` got changed, modifying the instruction to edit the raw `.gclient` file to avoid unexpected gclient behavior. Rich diff: https://github.com/flutter/engine/pull/55365/files?short_path=355a854#diff-355a854159c6f6da4e4e296d0cceb1e7e32ef26af1598aa6cdfaafbdbc656b57 Or rendered md: https://github.com/flutter/engine/blob/b375b805f9bbf478c1618dd0d03a02a11d4e65ab/docs/contributing/Compiling-the-engine.md#compiling-for-fuchsia Bug: http://b/368770157 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent 140c67c commit 5a5fb09

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

docs/contributing/Compiling-the-engine.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,18 +200,28 @@ Also, be sure that Python27 is before any other python in your Path.
200200

201201
### Build components for Fuchsia
202202

203-
1. Building fuchsia is only supported on linux. You need to run `gclient config --custom-var=download_fuchsia_deps=True` then `gclient sync`.
203+
1. Building fuchsia is only supported on linux. You need to update `engine/.gclient`, or `../.gclient` if current directory is `engine/src`, with `custom_vars`.
204204

205-
It will set `"download_fuchsia_deps": True` in `"custom_vars"` section in `.gclient` file, and download necessary binaries to build fuchsia components.
205+
```
206+
solutions = [
207+
{
208+
# ...
209+
"custom_vars": {
210+
"download_fuchsia_deps": True,
211+
"run_fuchsia_emu": True,
212+
},
213+
},
214+
]
215+
```
206216

207-
2. If you'd like to run tests locally, also run `gclient config --custom-var=run_fuchsia_emu=True` then `gclient sync`.
217+
> You may ignore `"run_fuchsia_emu": True` if you won't run tests locally.
208218
209-
It will set `"run_fuchsia_emu": True` in `"custom_vars"` section in `.gclient` file, and download necessary binaries and images to run tests on fuchsia emulators.
210-
You can set both `custom_vars` and run `gclient sync` only once.
219+
Run `gclient sync`.
211220

212-
You will also need kvm enabled, or nested virtualization on the gcloud VMs. Fuchsia and the tests will all be executed on the qemu.
221+
> [!WARNING]
222+
> When running tests locally, you will also need kvm enabled, or nested virtualization on the gcloud VMs. Fuchsia and the tests will all be executed on the qemu.
213223
214-
3. Prepare and build
224+
2. Prepare and build
215225

216226
```
217227
./flutter/tools/gn --fuchsia --no-lto
@@ -238,7 +248,7 @@ fuchsia_tests
238248
* Use `autoninja` if it's available.
239249
* `-C out/fuchsia_release_x64` for release build; other configurations are similar with a different folder name in `out/`.
240250

241-
4. Run all tests locally
251+
3. Run all tests locally
242252

243253
```
244254
python3 flutter/tools/fuchsia/with_envs.py flutter/testing/fuchsia/run_tests.py
@@ -247,6 +257,10 @@ python3 flutter/tools/fuchsia/with_envs.py flutter/testing/fuchsia/run_tests.py
247257
* It runs the tests in `out/fuchsia_debug_x64` by default. According to the configuration, it may take 5 minutes with regular gtest output to the terminal.
248258
* Add `fuchsia_release_x64` at the end of the command for release build; other configurations are similar with a different folder name in `out/`.
249259

260+
```
261+
python3 flutter/tools/fuchsia/with_envs.py flutter/testing/fuchsia/run_tests.py fuchsia_release_x64
262+
```
263+
250264
## Compiling for the Web
251265

252266
For building the engine for the Web we use the [felt](https://github.com/flutter/engine/blob/main/lib/web_ui/README.md) tool.

0 commit comments

Comments
 (0)