[Feature Request] GraalVM Target

It would be great to generate executable, bitcode, shared libraries for graalvm

2 Likes

File Format

While the GraalVM LLVM runtime can execute plain bitcode files, the preferred format is a native executable with embedded bitcode . The executable file formats differ on Linux and macOS. Linux by default uses ELF files. The bitcode is stored in a section called .llvmbc . The macOS platform uses Mach-O files. The bitcode is in the __bundle section of the __LLVM segment.

Using native executables with embedded bitcode offers two advantages over plain bitcode files. First, build systems for native projects, for example a Makefile , expect the result to be an executable. Embedding the bitcode instead of changing the output format improves compatibility with existing projects. Second, executables allow specifying library dependencies which is not possible with LLVM bitcode. The GraalVM LLVM runtime utilizes this information to find and load dependencies.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.