Build OpenJDK for Windows x64 w/ VS 2017 on WSL

Erik Joelsson erik.joelsson at oracle.com
Tue Jan 23 16:29:16 UTC 2018


Hello Yasumasa,

On 2018-01-23 06:22, Yasumasa Suenaga wrote:
> Hi all,
>
> I'm trying to build OpenJDK for Windows x64 with VS 2017 on WSL.
> I've modified some build scripts [1], but I cannot build yet.
>
> So I have some questions:
>
>   - Do build-dev team have any plan to support VS 2017 ?
>
Yes, we are planning on upgrading the toolchains for JDK 11 and we 
usually aim for the latest when we do so. I would say that patches here 
are welcome since it will save us work when we finally get around to do it.
>   - Do build-dev team have any plan to support WSL as build platform?
>     According to [2], I guess WSL may be supported in the future.
>
Yes, we are certainly interested in exploring WSL as a substitute for 
Cygwin at some point. The only reason we haven't started yet is simply 
resourcing. Other things have had and still have higher priority.

So far I have only tried building natively in WSL, which works fine for 
producing Linux binaries on Windows. Calling the Windows toolchain from 
WSL will be trickier. AFAIK, environment variables are still not shared 
between the environments, so we must make sure to communicate a good 
value for the PATH variable in some smart way for the Windows tools to 
work properly. It will also require the source code to be located in a 
path reachable from both Windows and WSL and we need to extend fixpath 
to handle path conversions. All in all, I expect this to be non trivial 
work that will likely require some creative solutions to get to work well.

/Erik
>
> I'm happy if OpenJDK can be built on WSL, and I want to use modern 
> environment for OpenJDK because I want to use modern C++ compiler for 
> my own project and I want not to keep multiple IDEs :-)
>
>
> Thanks,
>
> Yasumasa
>
>
> [1] http://cr.openjdk.java.net/~ysuenaga/wsl/
> [2] 
> http://hg.openjdk.java.net/jdk/jdk/file/fd237da7a113/doc/building.md#l166




More information about the build-dev mailing list