oracle / graal

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

[GR-34674] AWT Windows linker invocations lack /MACHINE #3923

Open galderz opened 2 years ago

galderz commented 2 years ago

See https://github.com/quarkusio/quarkus/issues/20681

      ># LINK : warning LNK4001: no object files specified; libraries used
      ># LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
      >#    Creating library java.lib and object java.exp
      ># code-with-quarkus-1.0.0-SNAPSHOT-runner.lib(code-with-quarkus-1.0.0-SNAPSHOT-runner.exe) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'

Unless 32 bit is supported, JNIRegistrationAWTSupport should add /MACHINE:X64 to the linker invocation.

galderz commented 2 years ago

Actually, the odd thing here is that one should be able to pass in NativeLinkerOption but that's ignored in the linker (or compiler?) calls that JNIRegistrationSupport does when making shimDLLs. That's ignored because there's not really linker being invoked, but the compiler via CCompilerInvoker?

munishchouhan commented 2 years ago

@christianwimmer please advice