sdk
sdk copied to clipboard
gen_snapshot: Direct generation of PE / DLL when AOT compiling for Windows
We can directly produce ELF for Linux, Android and Fuchsia and Mach-O for Mac. For Windows we should support directly producing PE.
We can currently indirectly produce such a DLL by generating assembly and having Clang, etc produce the DLL, but this requires users to have Clang available, is harder to correctly setup, and is slower.
We have a very limited version of this in runtime/tools/bin_to_coff.py.
We should consider to generating COFF so that we could statically link snapshot and runtime as well.
(The same for ELF and Mach-O - we should generate appropriate object file variants)