@@ -145,10 +145,9 @@ toolchain.
145
145
146
146
1 . Download the latest [ MSYS2 installer] [ msys2 ] and go through the installer.
147
147
148
- 2 . Run ` mingw32_shell.bat ` or ` mingw64_shell.bat ` from the MSYS2 installation
149
- directory (e.g. ` C:\msys64 ` ), depending on whether you want 32-bit or 64-bit
150
- Rust. (As of the latest version of MSYS2 you have to run `msys2_shell.cmd
151
- -mingw32` or ` msys2_shell.cmd -mingw64` from the command line instead.)
148
+ 2 . Start a MINGW64 or MINGW32 shell (depending on whether you want 32-bit
149
+ or 64-bit Rust) either from your start menu, or by running ` mingw64.exe `
150
+ or ` mingw32.exe ` from your MSYS2 installation directory (e.g. ` C:\msys64 ` ).
152
151
153
152
3 . From this terminal, install the required tools:
154
153
@@ -157,8 +156,7 @@ toolchain.
157
156
pacman -Sy pacman-mirrors
158
157
159
158
# Install build tools needed for Rust. If you're building a 32-bit compiler,
160
- # then replace "x86_64" below with "i686". If you've already got Git, Python,
161
- # or CMake installed and in PATH you can remove them from this list.
159
+ # then replace "x86_64" below with "i686".
162
160
# Note that it is important that you do **not** use the 'python2', 'cmake',
163
161
# and 'ninja' packages from the 'msys2' subsystem.
164
162
# The build has historically been known to fail with these packages.
@@ -175,9 +173,21 @@ toolchain.
175
173
4 . Navigate to Rust's source code (or clone it), then build it:
176
174
177
175
``` sh
178
- python x.py setup user && python x.py build && python x.py install
176
+ python x.py setup dist && python x.py build && python x.py install
179
177
```
180
178
179
+ If you want to use the native versions of Git, Python, or CMake you can remove
180
+ them from the above pacman command and install them from another source. Make
181
+ sure that they're in your Windows PATH, and edit the relevant ` mingw[32|64].ini `
182
+ file in your MSYS2 installation directory by uncommenting the line
183
+ ` MSYS2_PATH_TYPE=inherit ` to include them in your MSYS2 PATH.
184
+
185
+ Using Windows native Python can be helpful if you get errors when building LLVM.
186
+ You may also want to use Git for Windows, as it is often * much* faster. Turning
187
+ off real-time protection in the Windows Virus & Threat protections settings can
188
+ also help with long run times (although note that it will automatically turn
189
+ itself back on after some time).
190
+
181
191
### MSVC
182
192
183
193
MSVC builds of Rust additionally require an installation of Visual Studio 2017
0 commit comments