tshort / StaticCompiler.jl

Compiles Julia code to a standalone library (experimental)
Other
488 stars 31 forks source link

adaption to Windows #151

Closed Thomas008 closed 4 months ago

Thomas008 commented 5 months ago

clang is being used to generate directly the executable binary from the LLVM IR that is produced by GPUCompiler (instead of first generating an object file with help of GPUCompiler, and then using clang for linking). Here clang is still assumed to be installed locally, since on Windows there are problems to start the clang in the artifact of Clang_jll.

tshort commented 5 months ago

It'd be really nice to get tests working on Windows. For that, it seems like we need to get the interface to Clang_jll to work. @Thomas008, what are the "problems to start the clang" that you mention?

tshort commented 5 months ago

What is the file test/stc_test.jl for? I don't see where that's used.

Thomas008 commented 5 months ago

When starting the clang of the artifact I get a Windows error: The procedure entry point "_ZSt14_once_functor" could not be located in the DLL C:\Julia-1.10.0\bin\libLLVM-15jl.dll I have documented this as an issue in Clang_jll: https://github.com/JuliaPackaging/Yggdrasil/issues/8015

The file test/stc_test.jlwas for my testing only, it is not essential. To me it was useful to test what is working, and what is not working.

brenhinkeller commented 4 months ago

Is the cmd /c strictly necessary in

run(`cmd /c clang -Wno-override-module $wrapper_path $ir_path -o $exec_path`)

? It looks like that starts a new CMD shell, but presumably run is already starting one?

brenhinkeller commented 4 months ago

Ok, I think this is mergeable in principle now. We don't have Windows CI yet, but we do have tests on the alternative just-give-llvm-to-clang compilation pipeline in general since that's been split out as a kwarg that is true by default on Windows

brenhinkeller commented 4 months ago

Should close #137