blob: 13aad6b68338e2cc9b7b0d21dd6ba623f3314076 [file] [log] [blame] [view]
nyquistba0c9142015-09-21 15:58:501# Using GN
maniscalcobedea3052016-02-05 19:37:302Blimp only supports building using [GN](../../tools/gn/README.md). A quick
3overview over how to use GN can be found in the GN
4[quick start guide](../../tools/gn/docs/quick_start.md).
nyquistba0c9142015-09-21 15:58:505
maniscalcobedea3052016-02-05 19:37:306There are three different build configurations depending on what you want to
7build:
8
9## Android client
10
11Create an out-directory and set the GN args:
nyquist8c29da532015-09-21 19:00:3412
dtrainor4ae32722015-09-26 00:14:1213```bash
maniscalcobedea3052016-02-05 19:37:3014mkdir -p out-android/Debug
nyquistba0c9142015-09-21 15:58:5015gn args out-android/Debug
16```
nyquist8c29da532015-09-21 19:00:3417
nyquistba0c9142015-09-21 15:58:5018This will bring up an editor, where you can type in the following:
19
dtrainor4ae32722015-09-26 00:14:1220```bash
nyquistba0c9142015-09-21 15:58:5021target_os = "android"
22is_debug = true
23is_clang = true
24is_component_build = true
25symbol_level = 1 # Use -g1 instead of -g2
26use_goma = true
27```
28
maniscalcobedea3052016-02-05 19:37:3029To build:
nyquist8c29da532015-09-21 19:00:3430
dtrainor4ae32722015-09-26 00:14:1231```bash
maniscalcobedea3052016-02-05 19:37:3032ninja -C out-android/Debug blimp
33```
34
35You can also build and install incremental APK like this:
36
37```bash
38ninja -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
44Create another out-directory and set the GN args. Note, when building to run
45inside a Docker container you'll need to set the target_os to "chromeos":
46
47```bash
48mkdir -p out-chromeos/Debug
49gn args out-chromeos/Debug
50```
51
52This will bring an editor, where you can type in the following:
53
54```bash
55target_os = "chromeos"
56is_debug = true
57is_clang = true
58symbol_level = 1 # Use -g1 instead of -g2
59use_goma = true
60use_aura = true
61use_ozone = true
62use_alsa = false
63use_pulseaudio = false
64```
65
66To build:
67
68```bash
69ninja -C out-chromeos/Debug blimp
70```
71
72## "Bare" engine, no Docker container
73
74Create another out-directory and set the GN args:
75
76```bash
77mkdir -p out-linux/Debug
nyquistba0c9142015-09-21 15:58:5078gn args out-linux/Debug
79```
nyquist8c29da532015-09-21 19:00:3480
maniscalcobedea3052016-02-05 19:37:3081This will bring an editor, where you can type in the following:
nyquist8c29da532015-09-21 19:00:3482
dtrainor4ae32722015-09-26 00:14:1283```bash
nyquistba0c9142015-09-21 15:58:5084is_debug = true
85is_clang = true
86is_component_build = true
87symbol_level = 1 # Use -g1 instead of -g2
88use_goma = true
haibinlu6b8cc142015-11-04 01:03:0089use_aura = true
90use_ozone = true
nyquistba0c9142015-09-21 15:58:5091```
92
maniscalcobedea3052016-02-05 19:37:3093To build:
nyquistba0c9142015-09-21 15:58:5094
dtrainor4ae32722015-09-26 00:14:1295```bash
nyquistba0c9142015-09-21 15:58:5096ninja -C out-linux/Debug blimp
97```