Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Windows Build Instructions | 1 # Windows Build Instructions |
| 2 | 2 |
| 3 ## Setting up Windows | 3 ## Setting up Windows |
| 4 | 4 |
| 5 You must set your Windows system locale to English, or else you may get | 5 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 | 6 build errors about "The file contains a character that cannot be |
| 7 represented in the current code page." | 7 represented in the current code page." |
| 8 | 8 |
| 9 ### Setting up the environment for Visual Studio | 9 ### Setting up the environment for Visual Studio |
| 10 | 10 |
| 11 You must build with Visual Studio 2013 Update 4 or Visual Studio 2015 | 11 You must build with Visual Studio 2013 Update 4 or Visual Studio 2015 |
| 12 Update 1, no other versions are supported. | 12 Update 1, no other versions are supported. |
| 13 | 13 |
| 14 You must have Windows 7 x64 or later. x86 OSs are unsupported. | 14 You must have Windows 7 x64 or later. x86 OSs are unsupported. |
| 15 | 15 |
| 16 1. Get | 16 1. Get |
| 17 [depot\_tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/de pot_tools/docs/html/depot_tools_tutorial.html#_setting_up). | 17 [depot\_tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/de pot_tools/docs/html/depot_tools_tutorial.html#_setting_up). |
|
tfarina
2016/04/01 11:15:28
also remove \ here?
dcheng
2016/04/01 17:26:23
This one is necessary (I think). Inside code block
| |
| 18 2. Follow the appropriate path below: | 18 2. Follow the appropriate path below: |
| 19 | 19 |
| 20 ### Open source contributors | 20 ### Open source contributors |
| 21 | 21 |
| 22 For building with Visual Studio 2015 (default compiler as of March 10, | 22 ####For building with Visual Studio 2015 (default compiler as of March 10, 2016) : |
|
brucedawson
2016/04/01 17:35:25
The switchover date was actually March 11, 2016. M
| |
| 23 2016): | |
| 24 | 23 |
| 25 > Install Visual Studio 2015 Update 1 or later - Community Edition | 24 Install Visual Studio 2015 Update 1 or later - Community Edition |
|
brucedawson
2016/04/01 17:35:25
Why are we removing the indenting? I know it's not
dcheng
2016/04/01 19:57:13
I did look at the original sites page and noticed
| |
| 26 > should work if its license is appropriate for you. Be sure to select | 25 should work if its license is appropriate for you. Use the Custom Install option |
| 27 > Custom install and select VC++ (which selects three sub-categories | 26 and select: |
| 28 > including MFC) and, under Universal Windows App Development Tools, | |
| 29 > select Tools (1.2) and Windows 10 SDK (10.0.10586). You must have the | |
| 30 > 10586 SDK installed or else you will hit compile errors such as | |
| 31 > redefined macros. | |
| 32 | 27 |
| 33 For building with Visual Studio 2013 (no longer default as of March 10, | 28 - Visual C++, which will select three sub-categories including MFC |
| 34 2016, and not recommended - requires setting GYP\_MSVS\_VERSION=2013): | 29 - Universal Windows Apps Development Tools > Tools (1.2) |
| 30 - Universal Windows Apps Development Tools > Windows 10 SDK (10.0.10586) | |
| 35 | 31 |
| 36 > Install [Visual Studio 2013 | 32 You must have the 10586 SDK installed or else you will hit compile errors such |
| 37 > Community](http://www.visualstudio.com/products/visual-studio-community-vs) | 33 as redefined macros. |
| 38 > or [Visual Studio 2013 | |
| 39 > Professional](http://www.visualstudio.com/products/visual-studio-professional- with-msdn-vs) | |
| 40 > depending on which license is appropriate for you. You can deselect | |
| 41 > the default options if you want, but you must make sure to install | |
| 42 > "Microsoft Foundation Classes for C++". | |
| 43 > \ | |
| 44 > You should also install the [Windows 10 | |
| 45 > SDK](https://dev.windows.com/en-us/downloads/windows-10-sdk) to the | |
| 46 > default install location. You must have SDK version 10.0.10586 or | |
| 47 > greater installed. | |
| 48 | 34 |
| 49 Run `set DEPOT\_TOOLS\_WIN\_TOOLCHAIN=0`, or set that variable in your | 35 #### For building with Visual Studio 2013 (no longer default as of March 10, 201 6, and not recommended - requires setting `GYP_MSVS_VERSION=2013`): |
| 36 | |
| 37 Install [Visual Studio 2013 | |
| 38 Community](http://www.visualstudio.com/products/visual-studio-community-vs) | |
| 39 or [Visual Studio 2013 | |
| 40 Professional](http://www.visualstudio.com/products/visual-studio-professional-wi th-msdn-vs) | |
| 41 depending on which license is appropriate for you. You can deselect | |
| 42 the default options if you want, but you must make sure to install | |
| 43 "Microsoft Foundation Classes for C++". | |
| 44 | |
| 45 You should also install the [Windows 10 | |
| 46 SDK](https://dev.windows.com/en-us/downloads/windows-10-sdk) to the | |
| 47 default install location. You must have SDK version 10.0.10586 or | |
| 48 greater installed. | |
| 49 | |
| 50 Run `set DEPOT_TOOLS_WIN_TOOLCHAIN=0`, or set that variable in your | |
| 50 global environment. | 51 global environment. |
| 51 | 52 |
| 52 Visual Studio Express 2013 is **not** supported and will not be able to | 53 Visual Studio Express 2013 is **not** supported and will not be able to |
| 53 build Chromium. | 54 build Chromium. |
| 54 | 55 |
| 55 Compilation is done through ninja, **not** Visual Studio. | 56 Compilation is done through ninja, **not** Visual Studio. |
| 56 | 57 |
| 57 ### Google employees | 58 ### Google employees |
| 58 | 59 |
| 59 Run: `download\_from\_google\_storage --config` and follow the | 60 Run: `download_from_google_storage --config` and follow the |
| 60 authentication instructions.**Note that you must authenticate with your | 61 authentication instructions. **Note that you must authenticate with your |
| 61 @google.com credentials**, not @chromium.org. Enter "0" if asked for a | 62 @google.com credentials**, not @chromium.org. Enter "0" if asked for a |
| 62 project-id. | 63 project-id. |
| 63 | 64 |
| 64 Once you've done this, the toolchain will be installed automatically for | 65 Once you've done this, the toolchain will be installed automatically for |
| 65 you in Step 3, below (near the end of the step). | 66 you in Step 3, below (near the end of the step). |
| 66 | 67 |
| 67 The toolchain will be in depot\_tools\\win\_toolchain, and windbg can be | 68 The toolchain will be in `depot_tools\win_toolchain`, and windbg can be |
| 68 found in | 69 found in `depot_tools\win_toolchain\vs2013_files\win8sdk\Debuggers`. |
| 69 depot\_tools\\win\_toolchain\\vs2013\_files\\win8sdk\\Debuggers. | |
| 70 | 70 |
| 71 If you want the IDE for debugging and editing, you will need to install | 71 If you want the IDE for debugging and editing, you will need to install |
| 72 it separately, but this is optional and not needed to build Chromium. | 72 it separately, but this is optional and not needed to build Chromium. |
| 73 | 73 |
| 74 ## Getting the Code | 74 ## Getting the Code |
| 75 | 75 |
| 76 Follow the steps to [check out the | 76 Follow the steps to [check out the |
| 77 code](https://www.chromium.org/developers/how-tos/get-the-code) (largely | 77 code](https://www.chromium.org/developers/how-tos/get-the-code) (largely |
| 78 "fetch chromium"). | 78 `fetch chromium`). |
| 79 | 79 |
| 80 ## Building | 80 ## Building |
| 81 | 81 |
| 82 Build the target you are interested in. | 82 Build the target you are interested in. |
| 83 | 83 |
| 84 ```shell | 84 ```shell |
| 85 ninja -C out\\Debug chrome | 85 ninja -C out\Debug chrome |
| 86 ``` | 86 ``` |
| 87 | 87 |
| 88 Alternative (Graphical user interface): Open a generated .sln | 88 Alternative (Graphical user interface): Open a generated .sln |
| 89 file such as all.sln, right-click the chrome project and select build. | 89 file such as all.sln, right-click the chrome project and select build. |
| 90 This will invoke the real step 4 above. Do not build the whole solution | 90 This will invoke the real step 4 above. Do not build the whole solution |
| 91 since that conflicts with ninja's build management and everything will | 91 since that conflicts with ninja's build management and everything will |
| 92 explode. | 92 explode. |
| 93 Substitute the build directory given to -C with out\\Debug\_x64 for | 93 Substitute the build directory given to `-C` with `out\Debug_x64` for |
| 94 [64-bit | 94 [64-bit |
| 95 builds](https://www.chromium.org/developers/design-documents/64-bit-support) | 95 builds](https://www.chromium.org/developers/design-documents/64-bit-support) |
| 96 in GYP, or whatever build directory you have configured if using GN. | 96 in GYP, or whatever build directory you have configured if using GN. |
| 97 | 97 |
| 98 ### Performance tips | 98 ### Performance tips |
| 99 | 99 |
| 100 1. Have many and fast CPU cores and enough RAM to keep them all busy. | 100 1. Have a lot of fast CPU cores and enough RAM to keep them all busy. |
| 101 (Minimum recommended is 4-8 fast cores and 16-32 GB of RAM) | 101 (Minimum recommended is 4-8 fast cores and 16-32 GB of RAM) |
| 102 2. Reduce file system overhead by excluding build directories from | 102 2. Reduce file system overhead by excluding build directories from |
| 103 antivirus and indexing software. | 103 antivirus and indexing software. |
| 104 3. Store the build tree on a fast disk (preferably SSD). | 104 3. Store the build tree on a fast disk (preferably SSD). |
| 105 4. If you are primarily going to be doing debug development builds, you | 105 4. If you are primarily going to be doing debug development builds, you |
| 106 use the component build (in | 106 should use the component build: |
| 107 [GYP](https://www.chromium.org/developers/gyp-environment-variables) | 107 - for [GYP](https://www.chromium.org/developers/gyp-environment-variables) |
| 108 do set GYP\_DEFINES=component=shared\_library, in | 108 set `GYP_DEFINES=component=shared_library` |
| 109 [GN](https://www.chromium.org/developers/gn-build-configuration), | 109 - for [GN](https://www.chromium.org/developers/gn-build-configuration), |
| 110 set the build arg is\_component\_build = true). This will generate | 110 set the build arg `is_component_build = true`. |
| 111 many DLLs and enable incremental linking, which makes linking | 111 This will generate many DLLs and enable incremental linking, which makes |
| 112 *much*faster in Debug. | 112 linking **much** faster in Debug. |
| 113 | 113 |
| 114 Still expect build times of 30 minutes to 2 hours when everything has to | 114 Still, expect build times of 30 minutes to 2 hours when everything has to |
| 115 be recompiled. | 115 be recompiled. |
| OLD | NEW |