Windows: Replace VisualStudio with gcc/clang?

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Mon Mar 12 10:18:04 UTC 2018


Hi Hendrik,

This sounds like something that should be discussed on build-dev, rather 
than jdk-dev.

Short answer to your question: There's no technical reason why it would 
not be possible to use clang or gcc on Windows. However, the code is 
full of assumptions that "compiling on Windows" == "compiling using the 
Microsoft toolchain", and it will certainly take a lot of effort to hunt 
all these down and fix them properly.

Personally, I don't think it's worth the effort. It's unlikely that the 
resulting binary will have any significant change in performance (at 
least not any positive one), and it is likely to continuously break 
since people will be adding new code with the "windows" == "microsoft 
toolchain" assumption.

Question: Is the Visual Studio Express 
(https://www.visualstudio.com/vs/visual-studio-express/) such a hassle 
to install?

/Magnus

On 2018-03-06 12:17, Hendrik Schreiber wrote:
> Hey,
>
> inspired by the recent news that Chrome ditched the Microsoft C++ compiler and replaced it with gcc/clang (https://arstechnica.com/gadgets/2018/03/chrome-on-windows-ditches-microsofts-compiler-now-uses-clang/), I’m wondering wether that’s possible and desirable for OpenJDK, too.
>
>  From my point of view: Yes.
>
> Downloading, installing etc. Visual Studio is a major pain for anybody usually working on another platform. Whenever I encounter a bug that’s Windows specific, I pretty much always give up the idea to create a fix and instead just report a bug. It’s just too much of a hassle to create a working build environment.
>
> So has migrating to gcc/clang for Windows been evaluated? Is it an option at all? Would it make things easier or harder? What do you think? Besides ease of use, how would such a move affect performance?
>
> Cheers,
>
> -hendrik




More information about the build-dev mailing list