Create gn arg templates for use with blimp builds. Update build doc.
Currently all args must be manually set per output blimp build. Blimp already uses 3 common development builds. Using templates to define args would allow for developers to keep their args in sync more easily and would simplify blimp's gn build instructions. BUG= Review URL: https://codereview.chromium.org/1757093002 Cr-Commit-Position: refs/heads/master@{#379325}
This commit is contained in:
@ -12,18 +12,8 @@ Create an out-directory and set the GN args:
|
||||
|
||||
```bash
|
||||
mkdir -p out-android/Debug
|
||||
gn args out-android/Debug
|
||||
```
|
||||
|
||||
This will bring up an editor, where you can type in the following:
|
||||
|
||||
```bash
|
||||
target_os = "android"
|
||||
is_debug = true
|
||||
is_clang = true
|
||||
is_component_build = true
|
||||
symbol_level = 1 # Use -g1 instead of -g2
|
||||
use_goma = true
|
||||
echo "import(\"//build/args/blimp_client.gn\")" > out-android/Debug/args.gn
|
||||
gn gen out-android/Debug
|
||||
```
|
||||
|
||||
To build:
|
||||
@ -39,58 +29,19 @@ ninja -C out-android/Debug blimp blimp_apk_incremental &&
|
||||
out-android/Debug/bin/install_blimp_apk_incremental
|
||||
```
|
||||
|
||||
## Engine inside a Docker container
|
||||
|
||||
Create another out-directory and set the GN args. Note, when building to run
|
||||
inside a [Docker container](container.md) you'll need to turn off several
|
||||
dependencies:
|
||||
|
||||
To add your own build preferences
|
||||
```bash
|
||||
mkdir -p out-docker/Debug
|
||||
gn args out-docker/Debug
|
||||
gn args out-android/Debug
|
||||
```
|
||||
|
||||
This will bring an editor, where you can type in the following:
|
||||
|
||||
```bash
|
||||
target_os = "linux"
|
||||
is_debug = true
|
||||
is_clang = true
|
||||
symbol_level = 1 # Use -g1 instead of -g2
|
||||
use_goma = true
|
||||
use_aura = true
|
||||
use_ozone = true
|
||||
use_alsa = false
|
||||
use_pulseaudio = false
|
||||
use_cups = false
|
||||
use_glib = false
|
||||
```
|
||||
|
||||
To build:
|
||||
|
||||
```bash
|
||||
ninja -C out-docker/Debug blimp
|
||||
```
|
||||
|
||||
## "Bare" engine, no Docker container
|
||||
## Engine
|
||||
|
||||
Create another out-directory and set the GN args:
|
||||
|
||||
```bash
|
||||
mkdir -p out-linux/Debug
|
||||
gn args out-linux/Debug
|
||||
```
|
||||
|
||||
This will bring an editor, where you can type in the following:
|
||||
|
||||
```bash
|
||||
is_debug = true
|
||||
is_clang = true
|
||||
is_component_build = true
|
||||
symbol_level = 1 # Use -g1 instead of -g2
|
||||
use_goma = true
|
||||
use_aura = true
|
||||
use_ozone = true
|
||||
echo "import(\"//build/args/blimp_engine.gn\")" > out-linux/Debug/args.gn
|
||||
gn gen out-linux/Debug
|
||||
```
|
||||
|
||||
To build:
|
||||
@ -98,3 +49,8 @@ To build:
|
||||
```bash
|
||||
ninja -C out-linux/Debug blimp
|
||||
```
|
||||
|
||||
To add your own build preferences
|
||||
```bash
|
||||
gn args out-android/Debug
|
||||
```
|
||||
|
11
build/args/blimp_client.gn
Normal file
11
build/args/blimp_client.gn
Normal file
@ -0,0 +1,11 @@
|
||||
# GN args template for blimp Android client.
|
||||
#
|
||||
# Add import to arg.gn in out directory and run gn gen on the directory to use.
|
||||
# E.g. for out directory out/foo:
|
||||
# echo "import(\"build/args/blimp_client.gn\")" > out/foo/args.gn
|
||||
# gn gen out/foo
|
||||
#
|
||||
# Use gn args to add your own build preference args.
|
||||
|
||||
target_os = "android"
|
||||
is_component_build = true
|
17
build/args/blimp_engine.gn
Normal file
17
build/args/blimp_engine.gn
Normal file
@ -0,0 +1,17 @@
|
||||
# GN args template for a blimp engine. Works within a docker container.
|
||||
#
|
||||
# Add import to arg.gn in out directory and run gn gen on the directory to use.
|
||||
# E.g. for out directory out/foo:
|
||||
# echo "import(\"build/args/blimp_engine.gn\")" > out/foo/args.gn
|
||||
# gn gen out/foo
|
||||
#
|
||||
# Use gn args to add your own build preference args.
|
||||
|
||||
use_aura = true
|
||||
use_ozone = true
|
||||
|
||||
# Not available within docker container.
|
||||
use_alsa = false
|
||||
use_pulseaudio = false
|
||||
use_cups = false
|
||||
use_glib = false
|
Reference in New Issue
Block a user