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

Side by Side Diff: tools/gn/docs/reference.md

Issue 2824153002: Use $root:default as a "default" rule (Closed)
Patch Set: Code review feedback Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « tools/gn/build_settings.cc ('k') | tools/gn/ninja_build_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # GN Reference 1 # GN Reference
2 2
3 *This page is automatically generated from* `gn help --markdown all`. 3 *This page is automatically generated from* `gn help --markdown all`.
4 4
5 ## Contents 5 ## Contents
6 6
7 * [Commands](#commands) 7 * [Commands](#commands)
8 * [analyze: Analyze which targets are affected by a list of files.](#analy ze) 8 * [analyze: Analyze which targets are affected by a list of files.](#analy ze)
9 * [args: Display or configure arguments declared by the build.](#args) 9 * [args: Display or configure arguments declared by the build.](#args)
10 * [check: Check header dependencies.](#check) 10 * [check: Check header dependencies.](#check)
(...skipping 5843 matching lines...) Expand 10 before | Expand all | Expand 10 after
5854 //tools/gn -> //tools/gn:gn 5854 //tools/gn -> //tools/gn:gn
5855 ``` 5855 ```
5856 ### <a name="ninja_rules"></a>**Ninja build rules** 5856 ### <a name="ninja_rules"></a>**Ninja build rules**
5857 5857
5858 #### **The "all" and "default" rules** 5858 #### **The "all" and "default" rules**
5859 5859
5860 ``` 5860 ```
5861 All generated targets (see "gn help execution") will be added to an implicit 5861 All generated targets (see "gn help execution") will be added to an implicit
5862 build rule called "all" so "ninja all" will always compile everything. The 5862 build rule called "all" so "ninja all" will always compile everything. The
5863 default rule will be used by Ninja if no specific target is specified (just 5863 default rule will be used by Ninja if no specific target is specified (just
5864 typing "ninja"). If there is a target named "//:default" it will be the 5864 typing "ninja"). If there is a target named "default" in the root build file,
5865 default build rule, otherwise the implicit "all" rule will be used. 5865 it will be the default build rule, otherwise the implicit "all" rule will be
5866 used.
5866 ``` 5867 ```
5867 5868
5868 #### **Phony rules** 5869 #### **Phony rules**
5869 5870
5870 ``` 5871 ```
5871 GN generates Ninja "phony" rules for targets in the default toolchain. The 5872 GN generates Ninja "phony" rules for targets in the default toolchain. The
5872 phony rules can collide with each other and with the names of generated files 5873 phony rules can collide with each other and with the names of generated files
5873 so are generated with the following priority: 5874 so are generated with the following priority:
5874 5875
5875 1. Actual files generated by the build always take precedence. 5876 1. Actual files generated by the build always take precedence.
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
6146 * [--root: Explicitly specify source root.](#--root) 6147 * [--root: Explicitly specify source root.](#--root)
6147 * [--runtime-deps-list-file: Save runtime dependencies for targets in file .](#--runtime-deps-list-file) 6148 * [--runtime-deps-list-file: Save runtime dependencies for targets in file .](#--runtime-deps-list-file)
6148 * [--script-executable: Set the executable used to execute scripts.](#--sc ript-executable) 6149 * [--script-executable: Set the executable used to execute scripts.](#--sc ript-executable)
6149 * [--threads: Specify number of worker threads.](#--threads) 6150 * [--threads: Specify number of worker threads.](#--threads)
6150 * [--time: Outputs a summary of how long everything took.](#--time) 6151 * [--time: Outputs a summary of how long everything took.](#--time)
6151 * [--tracelog: Writes a Chrome-compatible trace log to the given file.](#- -tracelog) 6152 * [--tracelog: Writes a Chrome-compatible trace log to the given file.](#- -tracelog)
6152 * [-v: Verbose logging.](#-v) 6153 * [-v: Verbose logging.](#-v)
6153 * [--version: Prints the GN version number and exits.](#--version) 6154 * [--version: Prints the GN version number and exits.](#--version)
6154 ``` 6155 ```
6155 6156
OLDNEW
« no previous file with comments | « tools/gn/build_settings.cc ('k') | tools/gn/ninja_build_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698