nyquist | ba0c914 | 2015-09-21 15:58:50 | [diff] [blame] | 1 | # Using GN |
maniscalco | bedea305 | 2016-02-05 19:37:30 | [diff] [blame] | 2 | Blimp only supports building using [GN](../../tools/gn/README.md). A quick |
| 3 | overview over how to use GN can be found in the GN |
| 4 | [quick start guide](../../tools/gn/docs/quick_start.md). |
nyquist | ba0c914 | 2015-09-21 15:58:50 | [diff] [blame] | 5 | |
maniscalco | bedea305 | 2016-02-05 19:37:30 | [diff] [blame] | 6 | There are three different build configurations depending on what you want to |
| 7 | build: |
| 8 | |
| 9 | ## Android client |
| 10 | |
| 11 | Create an out-directory and set the GN args: |
nyquist | 8c29da53 | 2015-09-21 19:00:34 | [diff] [blame] | 12 | |
dtrainor | 4ae3272 | 2015-09-26 00:14:12 | [diff] [blame] | 13 | ```bash |
maniscalco | bedea305 | 2016-02-05 19:37:30 | [diff] [blame] | 14 | mkdir -p out-android/Debug |
nyquist | ba0c914 | 2015-09-21 15:58:50 | [diff] [blame] | 15 | gn args out-android/Debug |
| 16 | ``` |
nyquist | 8c29da53 | 2015-09-21 19:00:34 | [diff] [blame] | 17 | |
nyquist | ba0c914 | 2015-09-21 15:58:50 | [diff] [blame] | 18 | This will bring up an editor, where you can type in the following: |
| 19 | |
dtrainor | 4ae3272 | 2015-09-26 00:14:12 | [diff] [blame] | 20 | ```bash |
nyquist | ba0c914 | 2015-09-21 15:58:50 | [diff] [blame] | 21 | target_os = "android" |
| 22 | is_debug = true |
| 23 | is_clang = true |
| 24 | is_component_build = true |
| 25 | symbol_level = 1 # Use -g1 instead of -g2 |
| 26 | use_goma = true |
| 27 | ``` |
| 28 | |
maniscalco | bedea305 | 2016-02-05 19:37:30 | [diff] [blame] | 29 | To build: |
nyquist | 8c29da53 | 2015-09-21 19:00:34 | [diff] [blame] | 30 | |
dtrainor | 4ae3272 | 2015-09-26 00:14:12 | [diff] [blame] | 31 | ```bash |
maniscalco | bedea305 | 2016-02-05 19:37:30 | [diff] [blame] | 32 | ninja -C out-android/Debug blimp |
| 33 | ``` |
| 34 | |
| 35 | You can also build and install incremental APK like this: |
| 36 | |
| 37 | ```bash |
| 38 | ninja -C out-android/Debug blimp blimp_apk_incremental && |
| 39 | out-android/Debug/bin/install_blimp_apk_incremental |
| 40 | ``` |
| 41 | |
| 42 | ## Engine inside a Docker container |
| 43 | |
| 44 | Create another out-directory and set the GN args. Note, when building to run |
| 45 | inside a Docker container you'll need to set the target_os to "chromeos": |
| 46 | |
| 47 | ```bash |
| 48 | mkdir -p out-chromeos/Debug |
| 49 | gn args out-chromeos/Debug |
| 50 | ``` |
| 51 | |
| 52 | This will bring an editor, where you can type in the following: |
| 53 | |
| 54 | ```bash |
| 55 | target_os = "chromeos" |
| 56 | is_debug = true |
| 57 | is_clang = true |
| 58 | symbol_level = 1 # Use -g1 instead of -g2 |
| 59 | use_goma = true |
| 60 | use_aura = true |
| 61 | use_ozone = true |
| 62 | use_alsa = false |
| 63 | use_pulseaudio = false |
| 64 | ``` |
| 65 | |
| 66 | To build: |
| 67 | |
| 68 | ```bash |
| 69 | ninja -C out-chromeos/Debug blimp |
| 70 | ``` |
| 71 | |
| 72 | ## "Bare" engine, no Docker container |
| 73 | |
| 74 | Create another out-directory and set the GN args: |
| 75 | |
| 76 | ```bash |
| 77 | mkdir -p out-linux/Debug |
nyquist | ba0c914 | 2015-09-21 15:58:50 | [diff] [blame] | 78 | gn args out-linux/Debug |
| 79 | ``` |
nyquist | 8c29da53 | 2015-09-21 19:00:34 | [diff] [blame] | 80 | |
maniscalco | bedea305 | 2016-02-05 19:37:30 | [diff] [blame] | 81 | This will bring an editor, where you can type in the following: |
nyquist | 8c29da53 | 2015-09-21 19:00:34 | [diff] [blame] | 82 | |
dtrainor | 4ae3272 | 2015-09-26 00:14:12 | [diff] [blame] | 83 | ```bash |
nyquist | ba0c914 | 2015-09-21 15:58:50 | [diff] [blame] | 84 | is_debug = true |
| 85 | is_clang = true |
| 86 | is_component_build = true |
| 87 | symbol_level = 1 # Use -g1 instead of -g2 |
| 88 | use_goma = true |
haibinlu | 6b8cc14 | 2015-11-04 01:03:00 | [diff] [blame] | 89 | use_aura = true |
| 90 | use_ozone = true |
nyquist | ba0c914 | 2015-09-21 15:58:50 | [diff] [blame] | 91 | ``` |
| 92 | |
maniscalco | bedea305 | 2016-02-05 19:37:30 | [diff] [blame] | 93 | To build: |
nyquist | ba0c914 | 2015-09-21 15:58:50 | [diff] [blame] | 94 | |
dtrainor | 4ae3272 | 2015-09-26 00:14:12 | [diff] [blame] | 95 | ```bash |
nyquist | ba0c914 | 2015-09-21 15:58:50 | [diff] [blame] | 96 | ninja -C out-linux/Debug blimp |
| 97 | ``` |