OLD | NEW |
1 # Windows Build Instructions | 1 # Windows Build Instructions |
2 | 2 |
3 ## Common checkout instructions | 3 ## Common checkout instructions |
4 | 4 |
5 This page covers Windows-specific setup and configuration. The | 5 This page covers Windows-specific setup and configuration. The |
6 [general checkout | 6 [general checkout |
7 instructions](http://dev.chromium.org/developers/how-tos/get-the-code) cover | 7 instructions](http://dev.chromium.org/developers/how-tos/get-the-code) cover |
8 installing depot tools and checking out the code via git. | 8 installing depot tools and checking out the code via git. |
9 | 9 |
10 ## Setting up Windows | 10 ## Setting up Windows |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 page): | 67 page): |
68 | 68 |
69 ```gn gen --ide=vs out\Default | 69 ```gn gen --ide=vs out\Default |
70 devenv out\Default\all.sln | 70 devenv out\Default\all.sln |
71 ``` | 71 ``` |
72 | 72 |
73 GN will produce a file `all.sln` in your build directory. It will internally | 73 GN will produce a file `all.sln` in your build directory. It will internally |
74 use Ninja to compile while still allowing most IDE functions to work (there is | 74 use Ninja to compile while still allowing most IDE functions to work (there is |
75 no native Visual Studio compilation mode). If you manually run "gen" again you | 75 no native Visual Studio compilation mode). If you manually run "gen" again you |
76 will need to resupply this argument, but normally GN will keep the build and | 76 will need to resupply this argument, but normally GN will keep the build and |
77 IDE files up-to-date automatically when you build. | 77 IDE files up to date automatically when you build. |
78 | 78 |
79 The generated solution will contain several thousand projects and will be very | 79 The generated solution will contain several thousand projects and will be very |
80 slow to load. Use the `--filters` argument to restrict generating project files | 80 slow to load. Use the `--filters` argument to restrict generating project files |
81 for only the code you're interested in, although this will also limit what | 81 for only the code you're interested in, although this will also limit what |
82 files appear in the project explorer. A minimal solution that will let you | 82 files appear in the project explorer. A minimal solution that will let you |
83 compile and run Chrome in the IDE but will not show any source files is: | 83 compile and run Chrome in the IDE but will not show any source files is: |
84 | 84 |
85 ```gn gen --ide=vs --filters=//chrome out\Default``` | 85 ```gn gen --ide=vs --filters=//chrome out\Default``` |
86 | 86 |
87 There are other options for controlling how the solution is generated, run `gn | 87 There are other options for controlling how the solution is generated, run `gn |
88 help gen` for the current documentation. | 88 help gen` for the current documentation. |
89 | 89 |
90 ## Performance tips | 90 ## Performance tips |
91 | 91 |
92 1. Have a lot of fast CPU cores and enough RAM to keep them all busy. | 92 1. Have a lot of fast CPU cores and enough RAM to keep them all busy. |
93 (Minimum recommended is 4-8 fast cores and 16-32 GB of RAM) | 93 (Minimum recommended is 4-8 fast cores and 16-32 GB of RAM) |
94 2. Reduce file system overhead by excluding build directories from | 94 2. Reduce file system overhead by excluding build directories from |
95 antivirus and indexing software. | 95 antivirus and indexing software. |
96 3. Store the build tree on a fast disk (preferably SSD). | 96 3. Store the build tree on a fast disk (preferably SSD). |
97 4. If you are primarily going to be doing debug development builds, you | 97 4. If you are primarily going to be doing debug development builds, you |
98 should use the component build. Set the [build | 98 should use the component build. Set the [build |
99 arg](https://www.chromium.org/developers/gn-build-configuration) | 99 arg](https://www.chromium.org/developers/gn-build-configuration) |
100 `is_component_build = true`. | 100 `is_component_build = true`. |
101 This will generate many DLLs and enable incremental linking, which makes | 101 This will generate many DLLs and enable incremental linking, which makes |
102 linking **much** faster in Debug. | 102 linking **much** faster in Debug. |
103 | 103 |
104 Still, expect build times of 30 minutes to 2 hours when everything has to | 104 Still, expect build times of 30 minutes to 2 hours when everything has to |
105 be recompiled. | 105 be recompiled. |
OLD | NEW |