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

Side by Side Diff: docs/windows_build_instructions.md

Issue 2014753002: Update build instructions for Linux and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « docs/linux_faster_builds.md ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Windows Build Instructions 1 # Windows Build Instructions
2 2
3 ## Common checkout instructions
4
5 This page covers Windows-specific setup and configuration. The
6 [general checkout
7 instructions](http://dev.chromium.org/developers/how-tos/get-the-code) cover
8 installing depot tools and checking out the code via git.
9
3 ## Setting up Windows 10 ## Setting up Windows
4 11
5 You must set your Windows system locale to English, or else you may get 12 You must set your Windows system locale to English, or else you may get
6 build errors about "The file contains a character that cannot be 13 build errors about "The file contains a character that cannot be
7 represented in the current code page." 14 represented in the current code page."
8 15
9 ### Setting up the environment for Visual Studio 16 ### Setting up the environment for Visual Studio
10 17
11 You must build with Visual Studio 2015 Update 2; no other version is 18 You must build with Visual Studio 2015 Update 2; no other version is
12 supported. 19 supported.
13 20
14 You must have Windows 7 x64 or later. x86 OSs are unsupported. 21 You must have Windows 7 x64 or later. x86 OSs are unsupported.
15 22
16 ## Step 1: Getting depot_tools 23 ## Getting the compiler toolchain
17
18 Get [depot\_tools](http://commondatastorage.googleapis.com/chrome-infra-docs/fla t/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up).
19
20 ## Step 2: Getting the compiler toolchain
21 24
22 Follow the appropriate path below: 25 Follow the appropriate path below:
23 26
24 ### Open source contributors 27 ### Open source contributors
25 28
26 As of March 11, 2016 Chromium requires Visual Studio 2015 to build. 29 As of March 11, 2016 Chromium requires Visual Studio 2015 to build.
27 30
28 Install Visual Studio 2015 Update 2 or later - Community Edition 31 Install Visual Studio 2015 Update 2 or later - Community Edition
29 should work if its license is appropriate for you. Use the Custom Install option 32 should work if its license is appropriate for you. Use the Custom Install option
30 and select: 33 and select:
(...skipping 10 matching lines...) Expand all
41 44
42 Compilation is done through ninja, **not** Visual Studio. 45 Compilation is done through ninja, **not** Visual Studio.
43 46
44 ### Google employees 47 ### Google employees
45 48
46 Run: `download_from_google_storage --config` and follow the 49 Run: `download_from_google_storage --config` and follow the
47 authentication instructions. **Note that you must authenticate with your 50 authentication instructions. **Note that you must authenticate with your
48 @google.com credentials**, not @chromium.org. Enter "0" if asked for a 51 @google.com credentials**, not @chromium.org. Enter "0" if asked for a
49 project-id. 52 project-id.
50 53
51 Once you've done this, the toolchain will be installed automatically for 54 Run: `gclient sync` again to download and install the toolchain automatically.
52 you in Step 3, below (near the end of the step).
53 55
54 The toolchain will be in `depot_tools\win_toolchain\vs_files\<hash>`, and windbg 56 The toolchain will be in `depot_tools\win_toolchain\vs_files\<hash>`, and windbg
55 can be found in `depot_tools\win_toolchain\vs_files\<hash>\win_sdk\Debuggers`. 57 can be found in `depot_tools\win_toolchain\vs_files\<hash>\win_sdk\Debuggers`.
56 58
57 If you want the IDE for debugging and editing, you will need to install 59 If you want the IDE for debugging and editing, you will need to install
58 it separately, but this is optional and not needed to build Chromium. 60 it separately, but this is optional and not needed to build Chromium.
59 61
60 ## Step 3: Getting the Code 62 ## Using the Visual Studio IDE
61 63
62 Follow the steps to [check out the 64 If you want to use the Visual Studio IDE, use the `--ide` command line
63 code](https://www.chromium.org/developers/how-tos/get-the-code) (largely 65 argument to `gn gen` when you generate your output directory (as described on
64 `fetch chromium`). 66 the [get the code](http://dev.chromium.org/developers/how-tos/get-the-code)
67 page):
65 68
66 ## Step 4: Building 69 ```gn gen --ide=vs out\Default
67 70 devenv out\Default\all.sln
68 Build the target you are interested in.
69
70 ```shell
71 ninja -C out\Debug chrome
72 ``` 71 ```
73 72
74 Alternative (Graphical user interface): Open a generated .sln 73 GN will produce a file `all.sln` in your build directory. It will internally
75 file such as chrome.sln, right-click the chrome project and select build. 74 use Ninja to compile while still allowing most IDE functions to work (there is
76 This will invoke the real step 4 above. Do not build the whole solution 75 no native Visual Studio compilation mode). If you manually run "gen" again you
77 since that conflicts with ninja's build management and everything will 76 will need to resupply this argument, but normally GN will keep the build and
78 explode. 77 IDE files up-to-date automatically when you build.
79 Substitute the build directory given to `-C` with `out\Debug_x64` for
80 [64-bit
81 builds](https://www.chromium.org/developers/design-documents/64-bit-support)
82 in GYP, or whatever build directory you have configured if using GN.
83 78
84 ### Performance tips 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
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
83 compile and run Chrome in the IDE but will not show any source files is:
84
85 ```gn gen --ide=vs --filters=//chrome out\Default```
86
87 There are other options for controlling how the solution is generated, run `gn
88 help gen` for the current documentation.
89
90 ## Performance tips
85 91
86 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.
87 (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)
88 2. Reduce file system overhead by excluding build directories from 94 2. Reduce file system overhead by excluding build directories from
89 antivirus and indexing software. 95 antivirus and indexing software.
90 3. Store the build tree on a fast disk (preferably SSD). 96 3. Store the build tree on a fast disk (preferably SSD).
91 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
92 should use the component build: 98 should use the component build. Set the [build
93 - for [GYP](https://www.chromium.org/developers/gyp-environment-variables) 99 arg](https://www.chromium.org/developers/gn-build-configuration)
94 set `GYP_DEFINES=component=shared_library` 100 `is_component_build = true`.
95 - for [GN](https://www.chromium.org/developers/gn-build-configuration),
96 set the build arg `is_component_build = true`.
97 This will generate many DLLs and enable incremental linking, which makes 101 This will generate many DLLs and enable incremental linking, which makes
98 linking **much** faster in Debug. 102 linking **much** faster in Debug.
99 103
100 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
101 be recompiled. 105 be recompiled.
OLDNEW
« no previous file with comments | « docs/linux_faster_builds.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698