Auto merge of #21889 - dguenther:add-lld-readme, r=jdm

Add optional section to README for using lld-link on Windows

<!-- Please describe your changes on the following line: -->

Switching to lld-link as described in #21243 decreased Windows dev build times for 1-line changes from 20 minutes to 10 minutes for me. The last comment on that issue mentioned that a readme change might be welcome, hopefully this is useful 😄

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21243

<!-- Either: -->
- [x] These changes do not require tests because they only affect the README

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21889)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-10-08 20:31:42 -04:00 committed by GitHub
commit 4a27e1723a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 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. 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: > 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) > 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` > 2. Install `python2.7 x86-x64` and `virtualenv`
> 3. Run `mach.bat build -d`. > 3. Run `mach.bat build -d`.
>If you have troubles with `x64 type` prompt as `mach.bat` set by default: >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` > 2. `cd to/the/path/servo`
> 3. `python mach build -d` > 3. `python mach build -d`