Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(966)

Unified Diff: tools/gn/docs/quick_start.md

Issue 1772213002: Create doc on build arg best practices for Blimp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix markdown syntax error. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/docs/build.md ('k') | tools/gn/docs/style_guide.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/docs/quick_start.md
diff --git a/tools/gn/docs/quick_start.md b/tools/gn/docs/quick_start.md
index d59abc8a5bee415671a5e12df78d1011bbcb101d..8b064deb18d5f0dedc5e71ec9276f7b2fb60403f 100644
--- a/tools/gn/docs/quick_start.md
+++ b/tools/gn/docs/quick_start.md
@@ -72,7 +72,6 @@ See [GNCrossCompiles](cross_compiles.md) for more info.
## Configuring goma
-
Run `gn args out/Default` (substituting your build directory as needed).
Add:
@@ -282,6 +281,24 @@ ninja: Entering directory 'out/Default'
Hello, Bill and Joy.
```
+## Add a new build argument
+
+You declare which arguments you accept and specify default values via
+`declare_args`.
+
+```
+declare_args() {
+ enable_teleporter = true
+ enable_doom_melon = false
+}
+```
+
+See `gn help buildargs` for an overview of how this works.
+See `gn help declare_args` for specifics on declaring them.
+
+It is an error to declare a given argument more than once in a given scope, so
+care should be used in scoping and naming arguments.
+
## Don't know what's going on?
You can run GN in verbose mode to see lots of messages about what it's
« no previous file with comments | « blimp/docs/build.md ('k') | tools/gn/docs/style_guide.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698