Closed mkitti closed 6 months ago
Ah yeah, I currently haven't implemented any windows-specific options just because StaticCompiler.jl currently doesn't support Windows AFAIU (except I suppose via WSL). Of course, that's no reason we can't add them here in the meanwhile if we can figure out the right llvm IR!
Ah good question. My approach to figuring out the right LLVM IR to add has been looking at what gets generated either by (A) @code_llvm
on equivalent Julia code or
(B) getting hold of a C program that does what I want and compiling it to LLVM IR with e.g. clang -emit-llvm -S foo.c -o foo.ll
In principle (A) could work on those ccalls
as long as you put them in a dummy function first so they can be compiled, but I think (A) also generally doesn't show you the variable and function definitions that come outside of the main function though so (B) is normally my go-to.
Here is a link to further investigations to make StaticCompiler possible for Windows: https://discourse.julialang.org/t/how-to-compile-to-stand-alone-executable-using-staticcompiler-in-windows/106767
Closed by #58
Currently ,
stdoutp()
will fail on Windows.To get C stdio on Windows, I think we need to implement the equivalent of these calls.
__iob_func
is defined inmsvcrt.dll
.Do you have a method for converting these to their
llvmcall
equivalents?