Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Checking out and Building Chromium for Windows | 1 # Checking out and Building Chromium for Windows |
| 2 | 2 |
| 3 There are instructions for other platforms linked from the | 3 There are instructions for other platforms linked from the |
| 4 [get the code](get_the_code.md) page. | 4 [get the code](get_the_code.md) page. |
| 5 | 5 |
| 6 ## Instructions for Google Employees | 6 ## Instructions for Google Employees |
| 7 | 7 |
| 8 Are you a Google employee? See | 8 Are you a Google employee? See |
| 9 [go/building-chrome-win](https://goto.google.com/building-chrome-win) instead. | 9 [go/building-chrome-win](https://goto.google.com/building-chrome-win) instead. |
| 10 | 10 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 184 ``` | 184 ``` |
| 185 | 185 |
| 186 There are other options for controlling how the solution is generated, run `gn | 186 There are other options for controlling how the solution is generated, run `gn |
| 187 help gen` for the current documentation. | 187 help gen` for the current documentation. |
| 188 | 188 |
| 189 ### Faster builds | 189 ### Faster builds |
| 190 | 190 |
| 191 * Reduce file system overhead by excluding build directories from | 191 * Reduce file system overhead by excluding build directories from |
| 192 antivirus and indexing software. | 192 antivirus and indexing software. |
| 193 * Store the build tree on a fast disk (preferably SSD). | 193 * Store the build tree on a fast disk (preferably SSD). |
| 194 * The more cores the better (20+ is not excessive) and lots of RAM is needed | |
| 195 (64 GB is not excessive). | |
| 194 | 196 |
| 195 Still, expect build times of 30 minutes to 2 hours when everything has to | 197 There are some gn flags that can improve build speeds. You can specify these |
| 196 be recompiled. | 198 in the editor that appears when you create your output directory |
| 199 (`gn args out/Default`) or on the gn gen command line | |
| 200 (`gn gen out/Default --args="is_component_build = false is_debug = true"`). | |
|
Dirk Pranke
2017/07/06 01:56:19
is_component_build=false is_debug=true won't even
brucedawson
2017/07/06 18:00:23
A debug non-component build works fine (I just dou
| |
| 201 Some helpful settings to consider using include: | |
| 202 * `is_component_build = true` - this uses more, smaller DLLs, and incremental | |
| 203 linking. | |
| 204 * `use_nacl = false` - this disables Native Client which is usually not needed f or | |
| 205 local builds. | |
| 206 * `target_cpu = "x86"` - x86 builds are slightly faster than x64 builds and | |
| 207 support incremental linking for more targets. Note that if you set this but | |
| 208 don't' set use_nacl = false then build times may get worse. | |
| 209 * `remove_webcore_debug_symbols = true` - turn off source-level debugging for | |
| 210 blink to reduce build times, appropriate if you don't plan to debug blink. | |
| 211 * `use_jumbo_build = true` - compile multiple translation units as one, for | |
| 212 faster builds (applies only to some components). | |
| 213 * `win_linker_timing = true` - this should not generally be set but can be | |
| 214 helpful when trying to understand build times or incremental linking failures. | |
| 215 | |
| 216 In addition, Google employees should consider using goma, a distributed | |
| 217 compilation system. Detailed information is available internally but the | |
| 218 relevant gn args are: | |
| 219 * `use_goma = true` | |
| 220 * `symbol_level = 2` - by default goma builds change symbol_level from 2 to 1 | |
| 221 which disables source-level debugging. This turns it back on. This actually | |
| 222 makes builds slower, but it makes goma more usable. | |
| 223 * `is_win_fastlink = true` - this is required if you have goma enabled and | |
| 224 symbol_level set to 2. | |
| 225 | |
| 226 Note that debugging of is_win_fastlink built binaries is unreliable prior to | |
| 227 VS 2017 Update 3 and may crash Visual Studio. | |
| 228 | |
| 229 To get any benefit from goma it is important to pass a large -j value to ninja. | |
| 230 A good default is 10\*numCores to 20\*numCores. If you run autoninja.bat then it | |
| 231 will pass an appropriate -j value to ninja for goma or not, automatically. | |
| 232 | |
| 233 When invoking ninja specify 'chrome' as the target to avoid building all test | |
| 234 binaries as well. | |
| 235 | |
| 236 Still, builds will take many hours on many machines. | |
| 197 | 237 |
| 198 ## Build Chromium | 238 ## Build Chromium |
| 199 | 239 |
| 200 Build Chromium (the "chrome" target) with Ninja using the command: | 240 Build Chromium (the "chrome" target) with Ninja using the command: |
| 201 | 241 |
| 202 ```shell | 242 ```shell |
| 203 $ ninja -C out\Default chrome | 243 $ ninja -C out\Default chrome |
| 204 ``` | 244 ``` |
| 205 | 245 |
| 206 You can get a list of all of the other build targets from GN by running | 246 You can get a list of all of the other build targets from GN by running |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 239 $ gclient sync | 279 $ gclient sync |
| 240 ``` | 280 ``` |
| 241 | 281 |
| 242 The first command updates the primary Chromium source repository and rebases | 282 The first command updates the primary Chromium source repository and rebases |
| 243 any of your local branches on top of tip-of-tree (aka the Git branch `origin/mas ter`). | 283 any of your local branches on top of tip-of-tree (aka the Git branch `origin/mas ter`). |
| 244 If you don't want to use this script, you can also just use `git pull` or | 284 If you don't want to use this script, you can also just use `git pull` or |
| 245 other common Git commands to update the repo. | 285 other common Git commands to update the repo. |
| 246 | 286 |
| 247 The second command syncs the subrepositories to the appropriate versions and | 287 The second command syncs the subrepositories to the appropriate versions and |
| 248 re-runs the hooks as needed. | 288 re-runs the hooks as needed. |
| OLD | NEW |