73 an SSD. The build process is very disk intensive, and having slow disk |
73 an SSD. The build process is very disk intensive, and having slow disk |
74 access will significantly increase build times. If you need to use a |
74 access will significantly increase build times. If you need to use a |
75 network share for the source code, see below for suggestions on how to keep |
75 network share for the source code, see below for suggestions on how to keep |
76 the build artifacts on a local disk. |
76 the build artifacts on a local disk. |
77 |
77 |
78 * On Windows, extra care must be taken to make sure the [Cygwin](#cygwin) |
78 * On Windows, if using [Cygwin](#cygwin), extra care must be taken to make sure |
79 environment is consistent. It is recommended that you follow this |
79 the environment is consistent. It is recommended that you follow this |
80 procedure: |
80 procedure: |
81 |
81 |
82 * Create the directory that is going to contain the top directory of the |
82 * Create the directory that is going to contain the top directory of the |
83 JDK clone by using the `mkdir` command in the Cygwin bash shell. |
83 JDK clone by using the `mkdir` command in the Cygwin bash shell. |
84 That is, do *not* create it using Windows Explorer. This will ensure |
84 That is, do *not* create it using Windows Explorer. This will ensure |
172 On Windows, it is important that you pay attention to the instructions in the |
172 On Windows, it is important that you pay attention to the instructions in the |
173 [Special Considerations](#special-considerations). |
173 [Special Considerations](#special-considerations). |
174 |
174 |
175 Windows is the only non-POSIX OS supported by the JDK, and as such, requires |
175 Windows is the only non-POSIX OS supported by the JDK, and as such, requires |
176 some extra care. A POSIX support layer is required to build on Windows. |
176 some extra care. A POSIX support layer is required to build on Windows. |
177 Currently, the only supported such layer is Cygwin. (Msys is no longer |
177 Currently, the only supported such layers are Windows Subsystem for Linux (WSL) |
178 supported due to a too old bash; msys2 and the new Windows Subsystem for Linux |
178 and Cygwin. (Msys is no longer supported due to a too old bash; msys2 would |
179 (WSL) would likely be possible to support in a future version but that would |
179 likely be possible to support in a future version but that would require effort |
180 require effort to implement.) |
180 to implement.) |
181 |
181 |
182 Internally in the build system, all paths are represented as Unix-style paths, |
182 Internally in the build system, all paths are represented as Unix-style paths, |
183 e.g. `/cygdrive/c/hg/jdk9/Makefile` rather than `C:\hg\jdk9\Makefile`. This |
183 e.g. `/cygdrive/c/hg/jdk9/Makefile` rather than `C:\hg\jdk9\Makefile`. This |
184 rule also applies to input to the build system, e.g. in arguments to |
184 rule also applies to input to the build system, e.g. in arguments to |
185 `configure`. So, use `--with-msvcr-dll=/cygdrive/c/msvcr100.dll` rather than |
185 `configure`. So, use `--with-msvcr-dll=/cygdrive/c/msvcr100.dll` rather than |
186 `--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section |
186 `--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section |
187 on [Fixpath](#fixpath). |
187 on [Fixpath](#fixpath). |
|
188 |
|
189 #### Windows Subsystem for Linux (WSL) |
|
190 |
|
191 Only Windows 10 1803 or newer is supported due to a dependency on the wslpath utility |
|
192 and support for environment variable sharing through WSLENV. |
|
193 |
|
194 You may build both Windows and Linux binaries from WSL. To build Windows binaries, |
|
195 you must use a Windows boot JDK (located in a Windows-accessible directory). To build |
|
196 Linux binaries, you must use a Linux boot JDK. The default behavior is to build for |
|
197 Windows. To build for Linux, pass `--build=x86_64-unknown-linux-gnu` and |
|
198 `--host=x86_64-unknown-linux-gnu` to `configure`. |
188 |
199 |
189 #### Cygwin |
200 #### Cygwin |
190 |
201 |
191 A functioning [Cygwin](http://www.cygwin.com/) environment is thus required for |
202 A functioning [Cygwin](http://www.cygwin.com/) environment is thus required for |
192 building the JDK on Windows. If you have a 64-bit OS, we strongly recommend |
203 building the JDK on Windows. If you have a 64-bit OS, we strongly recommend |