JuliaLang / PackageCompiler.jl

Compile your Julia Package
https://julialang.github.io/PackageCompiler.jl/dev/
MIT License
1.43k stars 193 forks source link

Output byte code? #232

Closed dogiv closed 4 years ago

dogiv commented 5 years ago

I'm trying to transpile Julia into C using the instructions here but I haven't found a way to produce a .bc file now that the --output-bc option no longer works. It seems like PackageCompiler must be producing bytecode as an intermediate result... does anyone know how to output the .bc file?

jamie-arcc commented 5 years ago

I am definitely interested in this, too. It would be great to be able to produce cross-platform builds in one "executable" that can then be JIT or fully compiled by llvm on the target host

KristofferC commented 5 years ago

What do you mean --output-bc no longer works?

dogiv commented 5 years ago

When I run it with the --output-bc flag it always tells me "ERROR: could not open file boot.jl" I can't remember where but I read somewhere that this option was deprecated. I'm running Julia 1.2.0 on Windows. e.g. C:>c:\julia\bin\julia.exe hello.jl hello world C:>c:\julia\bin\julia.exe --output-bc hello.jl ERROR: could not open file boot.jl C:>c:\julia\bin\julia.exe --compile=all --output-bc hello.jl ERROR: could not open file boot.jl C:>c:\julia\bin\julia.exe --compile=all hello.jl hello world

KristofferC commented 5 years ago

You need to explicitly give a sysimage with -Jpath/to/sysimage when you do output-(o/bc/ji).