Scott Graham | f94d84d | 2017-06-26 18:24:40 | [diff] [blame] | 1 | # Checking out and building on Fuchsia |
| 2 | |
David Dorwin | fe186dd | 2022-05-20 18:35:13 | [diff] [blame] | 3 | ***If you have followed the instructions below and are still having trouble, |
| 4 | see [Contact information](README.md#contact-information).*** |
Scott Graham | f94d84d | 2017-06-26 18:24:40 | [diff] [blame] | 5 | |
Fabrice de Gans-Riberi | 4468e91 | 2019-08-23 23:43:54 | [diff] [blame] | 6 | [TOC] |
| 7 | |
Scott Graham | f94d84d | 2017-06-26 18:24:40 | [diff] [blame] | 8 | ## System requirements |
| 9 | |
Zijie He | bd2aca07 | 2024-11-06 19:35:27 | [diff] [blame] | 10 | Building and running on Linux is officially supported, mac build is not. If you |
| 11 | are willing to run emulator based tests locally, KVM is required. You may check |
| 12 | if `/dev/kvm` exists on the system, or follow the [Enable KVM](#enable-kvm) |
| 13 | section. |
Scott Graham | f94d84d | 2017-06-26 18:24:40 | [diff] [blame] | 14 | |
Zijie He | bd2aca07 | 2024-11-06 19:35:27 | [diff] [blame] | 15 | 1. Follow up [chromium for linux](../linux/build_instructions.md) to setup |
| 16 | chromium environment. |
Scott Graham | f94d84d | 2017-06-26 18:24:40 | [diff] [blame] | 17 | |
Zijie He | bd2aca07 | 2024-11-06 19:35:27 | [diff] [blame] | 18 | 2. Edit your `.gclient` to add `fuchsia` to the `target_os` list. The file |
Fabrice de Gans | f941df7e | 2021-11-23 21:33:14 | [diff] [blame] | 19 | should look similar to this: |
| 20 | |
| 21 | ``` |
| 22 | solutions = [ |
| 23 | { |
| 24 | "url": "https://chromium.googlesource.com/chromium/src.git", |
| 25 | "managed": False, |
| 26 | "name": "src", |
| 27 | "custom_deps": {}, |
| 28 | "custom_vars": {} |
| 29 | } |
| 30 | ] |
| 31 | target_os = ['fuchsia'] |
| 32 | ``` |
| 33 | |
| 34 | 2. Run `gclient sync` |
Zijie He | bd2aca07 | 2024-11-06 19:35:27 | [diff] [blame] | 35 | |
Fabrice de Gans | f941df7e | 2021-11-23 21:33:14 | [diff] [blame] | 36 | 3. Create a build directory: |
| 37 | |
| 38 | ```shell |
| 39 | $ gn gen out/fuchsia --args="is_debug=false dcheck_always_on=true is_component_build=false target_os=\"fuchsia\"" |
| 40 | ``` |
| 41 | |
Takuto Ikuta |
|