Skip to content

Commit 5e18b4b

Browse files
authored
Auto merge of #34690 - alexcrichton:clarify-vcvars, r=brson
Clarify rustbuild + msvc + vcvars in README The invocation of vcvars is only needed for versions of Visual Studio that rustbuild or cmake doesn't understand, but if older versions are installed then there's no need to call vcvars. Closes #34576
2 parents d119362 + b67f23c commit 5e18b4b

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

Diff for: README.md

+19-7
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ build.
105105
106106
MSVC builds of Rust additionally require an installation of Visual Studio 2013
107107
(or later) so `rustc` can use its linker. Make sure to check the “C++ tools”
108-
option. In addition, `cmake` needs to be installed to build LLVM.
108+
option.
109109
110110
With these dependencies installed, the build takes two steps:
111111
@@ -116,13 +116,25 @@ $ make && make install
116116
117117
#### MSVC with rustbuild
118118
119-
For those who don't want the hassle of MSYS or MinGW, you can invoke rustbuild
120-
directly. All you need are Python 2, CMake, and Git in your PATH (make sure you
121-
do __not__ use the ones from MSYS!). You'll also need Visual Studio 2013 or
122-
newer with the C++ tools. Then all you need to do is invoke the appropriate
123-
vcvars bat file and kick off rustbuild.
119+
The old build system, based on makefiles, is currently being rewritten into a
120+
Rust-based build system called rustbuild. This can be used to bootstrap the
121+
compiler on MSVC without needing to install MSYS or MinGW. All you need are
122+
[Python 2](https://www.python.org/downloads/),
123+
[CMake](https://cmake.org/download/), and
124+
[Git](https://git-scm.com/downloads) in your PATH (make sure you do not use the
125+
ones from MSYS if you have it installed). You'll also need Visual Studio 2013 or
126+
newer with the C++ tools. Then all you need to do is to kick off rustbuild.
124127
125-
```bat
128+
```
129+
python .\src\bootstrap\bootstrap.py
130+
```
131+
132+
Currently rustbuild only works with some known versions of Visual Studio. If you
133+
have a more recent version installed that a part of rustbuild doesn't understand
134+
then you may need to force rustbuild to use an older version. This can be done
135+
by manually calling the appropriate vcvars file before running the bootstrap.
136+
137+
```
126138
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
127139
python .\src\bootstrap\bootstrap.py
128140
```

0 commit comments

Comments
 (0)