-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Hey GraalVM team,
I recently tried graalvm-22.0.0.2 for 64bit linux. It worked fine. I
was able to use native-image even on swing applications - not sure
if it works in general, but it seems to work fine for me on linux just
fine. My next idea was to test this on windows. Anyway.
On windows this is all a bit more complicated than on linux. :(
I tried to do the same steps, aka those that worked for me on linux,
but native-image complained that cl.exe was not found in PATH. So
it could not compile anything. Alright.
I then installed like +2.30 GB for Microsoft Visual Studio community
edition following some advice from SO. But even after trying for some time,
I still can not find cl.exe anywhere. Or I don't know where it was installed.
Went through some more stackoverflow comments but it did not help, then
I gave up.
Would it be possible to avoid using cl.exe? I have msys2 and I
can compile simple hello-world C programs on the commandline just
fine. GraalVM has some connection to LLVM so perhaps clang may also
work? But I honestly am too much of a noob to know how easy it is
to support that. I just want to avoid cl.exe if possible on windows. The
less I depend on Microsoft upstream the better for me - linux kind of
messed up my brain too, making me too impatient and lacking
tenacity. :P
Would it be possible to add more compiler-support here? native-image
could also just delegate to either clang or msys2 and download
stuff it needs in order for this to work - I am fine with all that if it ends
up with a system that works (via "native-image" that is). I am sure other
people managed to install cl.exe just fine, and use it fine as well, but I
struggle, and I don't really want or need visual studio anyway - commandline
is just fine. On Linux I just use gcc anyway most of the time (and sometimes
clang, but I am more of a gcc person still).
I don't know how feasible the above would be, but I would be fine
if msys2 or clang is limited compared to cl.exe. My use case is
primarily and mostly small java apps, ideally some swing-components too
(just the simple things - buttons, text-view ... these basic things;
the only other alternative would be to go full all-in via the
www interface, but having a standalone, drop-in .exe file would
be super-convenient to distribute towards elderly people in
particular.). Actually I'd want to avoid openjdk as well and just
all-in on graalvm now. :P
For the actual design, perhaps native-image could then have
compiler commandline options such as --compiler=msys2 or
--compiler=clang or something like that. That way it may default to
cl.exe still, but people could choose other compilers. And be notified
of that too, in that case, with mentioning what particular
commandline flag is to be used. Right now I only get the
notification that cl.exe could not be found, so appending an
additional sentence may be helpful IF other compilers are
supported too.
TL; DR: So the basic idea is to have more compiler options supported
without depending on cl.exe only..