Does the Mojo compiler currently have any way to either:
- Provide additional object files to be linked for external symbols (as produced by, say,
sys.external_call
) or - Create an object file with external linkage (similar to
-c
to a typical C compiler)?
Presently, mojo build --emit-llvm
can produce LLVM-IR that can be used in some such situations, but I’m concerned that using it in that way both bypasses the (not officially public) pass ordering that the Mojo compiler instructs LLVM to use, and may not contain (from my limited poking) the un-elaborated MLIR that would necessarily precede the “fancy GPU JIT stuff” that tends to be a selling point for the language and the platform.
If object file input/output to mojo build
/mojo package
is not supported, is there a way of using the output of --emit-llvm
in a relatively-not-horrible way to sidestep my concerns above about using the generated LLVM IR?