diff --git a/README.md b/README.md index 1b45ee9a44a..9f09fb8a1a1 100644 --- a/README.md +++ b/README.md @@ -221,13 +221,29 @@ settings for the installer are fine). 5. Install Visual Studio Community 2017 (https://www.visualstudio.com/vs/community/). You MUST add "Visual C++" to the list of installed components. It is not on by default. Visual Studio 2017 MUST installed to the default location or mach.bat will not find it. + +##### [Optional] Install LLVM for faster link times + +You may experience much faster builds on Windows by following these steps. (Related Rust issue: https://github.com/rust-lang/rust/issues/37543) + +1. Download the latest version of LLVM (http://releases.llvm.org/). +2. Run the installer and choose to add LLVM to the system PATH. +3. Add the following to your Cargo config (Found at `%USERPROFILE%\.cargo\config`). You may need to change the triple to match your environment. + +``` +[target.x86_64-pc-windows-msvc] +linker = "lld-link.exe" +``` + +##### Troubleshooting a Windows environment + > If you encountered errors with the environment above, do the following for a workaround: > 1. Download and install [Build Tools for Visual Studio 2017](https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15) > 2. Install `python2.7 x86-x64` and `virtualenv` > 3. Run `mach.bat build -d`. >If you have troubles with `x64 type` prompt as `mach.bat` set by default: -> 1. you may need to choose and launch the type manually, such as `x86_x64 Cross Tools Command Prompt for VS 2017` in the Windows menu.) +> 1. You may need to choose and launch the type manually, such as `x86_x64 Cross Tools Command Prompt for VS 2017` in the Windows menu.) > 2. `cd to/the/path/servo` > 3. `python mach build -d`