oracle / graal

GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
https://www.graalvm.org
Other
20.21k stars 1.62k forks source link

[GR-46847] Change Windows compiler to Mingw-w64 #6806

Open rcsilva83 opened 1 year ago

rcsilva83 commented 1 year ago

Feature request

Please include the following information:

Is your feature request related to a problem? Please describe. To create native images on Windows, the developer should install Microsoft Visual Studio C++ Build tools, which requires manual download, admin privileges and lots of disk space. Additionally, it makes it impossible to support Windows compilation from Linux or Mac.

Describe the solution you'd like. Change the compiler to the open source Mingw-w64 which makes de developer experience much better and can be used for cross compilation. It is used by some platforms, like Kotlin/Native.

Describe who do you think will benefit the most. GraalVM users creating Windows native images.

Describe alternatives you've considered. Just considered Mingw-w64 because it's the most popular option.

Additional context.

Express whether you'd like to help contributing this feature If you'd like to contribute, please read the contribution guide.

oubidar-Abderrahim commented 1 year ago

Thank you for your suggestions, we'll take a look into it shortly

oubidar-Abderrahim commented 1 year ago

Tracked internally on GR 46847

acltabontabon commented 8 months ago

Hello, Any news on this? 👀

MaD70 commented 3 months ago

An update on the status of this feature request would be greatly appreciated. Note that:

… the Mingw-w64 project is headers and support libraries to run the output of GCC on Windows.

The actual toolchain (which includes these files) is found in various distributions. The most frequently updated (excluding corsscompilers), with releases closely following the most recent GCC releases, at least in recent years, are w64devkit, WinLibs and MSYS2.

Alternatively, if you don't have resources to dedicate to MinGW-w64 support, could you indicate where exactly the C (or C++?) compiler is invoked? Is it possible to configure it manually without heroic effort?

Thank you.

UPDATE: Well apparently, despite the size of the project, it wasn't difficult to find the point where the presence of the compiler is detected. However, I would like to have confirmation that any use of the C/C++ compiler is via the WindowsBuildEnvironmentUtil class only.

UPDATE n.2: after delving into the code a little more it seems that the matter is not so simple: for example, there is also the WindowsCCompilerInvoker class.

wirthi commented 3 months ago

We are not actively working on this. It seems a good addition to support this compiler, but we lack the resources to actively work on this.

If anyone contributed support for it we are happy to see if that can be included by default.