@@ -118,11 +118,67 @@ MinGW-w64 compilers available through Cygwin's package manager.
118
118
119
119
# ## Compiling with MinGW/MSYS2
120
120
121
- Compiling Julia from source using [MSYS2](https://msys2.github.io) has worked
122
- in the past but is not actively supported. Pull requests to restore support
123
- would be welcome. See a [past version of this file](
124
- https://github.com/JuliaLang/julia/blob/v0.6.0/README.windows.md)
125
- for the former instructions for compiling using MSYS2.
121
+ > MSYS2 provides a robust MSYS experience.
122
+
123
+ Note: MSYS2 requires ** 64 bit** Windows 7 or newer.
124
+
125
+ 1. Install and configure [MSYS2](https://www.msys2.org/), Software Distribution
126
+ and Building Platform for Windows.
127
+
128
+ 1. Download and run the latest installer for the
129
+ [64-bit](https://github.com/msys2/msys2-installer/releases/latest) distribution.
130
+ The installer will have a name like ` msys2-x86_64-yyyymmdd.exe` .
131
+
132
+ 2. Open MSYS2. Update package database and base packages:
133
+ ` ` ` sh
134
+ pacman -Syu
135
+ ` ` `
136
+
137
+ 3. Exit and restart MSYS2, Update the rest of the base packages:
138
+ ` ` ` sh
139
+ pacman -Syu
140
+ ` ` `
141
+
142
+ 3. Then install tools required to build julia:
143
+ ` ` ` sh
144
+ # tools
145
+ pacman -S cmake diffutils git m4 make patch tar p7zip curl python
146
+
147
+ # For 64 bit Julia, install x86_64
148
+ pacman -S mingw-w64-x86_64-gcc
149
+ # For 32 bit Julia, install i686
150
+ pacman -S mingw-w64-i686-gcc
151
+ ` ` `
152
+
153
+ 4. Configuration of MSYS2 is complete. Now ` exit` the MSYS2 shell.
154
+
155
+
156
+ 2. Build Julia and its dependencies with pre-build dependencies.
157
+
158
+ 1. Open a new [** MINGW64/MINGW32 shell** ](https://www.msys2.org/docs/environments/# overview).
159
+ Currently we can' t use both mingw32 and mingw64,
160
+ so if you want to build the x86_64 and i686 versions,
161
+ you' ll need to build them in each environment separately.
162
+
163
+ 2. and clone the Julia sources
164
+ ` ` ` sh
165
+ git clone https://github.com/JuliaLang/julia.git
166
+ cd julia
167
+ ` ` `
168
+
169
+ 3. Start the build
170
+ ` ` ` sh
171
+ make -j$( nproc)
172
+ ` ` `
173
+
174
+ > Protip: build in dir
175
+ > ` ` ` sh
176
+ > make O=julia-mingw-w64 configure
177
+ > echo ' ifeq ($(BUILDROOT),$(JULIAHOME))
178
+ > $(error "in-tree build disabled")
179
+ > endif' >> Make.user
180
+ > make -C julia-mingw-w64
181
+ > ` ` `
126
182
127
183
128
184
# ## Cross-compiling from Unix
0 commit comments