New on Forem: “StaticCompiler - Generating small binaries"

@Thomas008 shares some valuable experiences of using StaticCompiler to generate binaries out from Julia code:

Thanks for sharing this!

3 Likes

I benefited a lot from Thomas008’s tutorial on StaticCompiler. I am trying to make a dll of my own, I need to work with array data, but I encountered an error when I tried to compile the following code. I want to know if there is a way to fix it.

function calc(a, b)
    a .*= b
    return 0
end
path = compile_shlib(calc, (Vector{Int}, Vector{Int}), "./")

gives

┌ Warning: Found pointer references to julia data
│   llvm instruction = %14 = call nonnull {}* inttoptr (i64 140728530324048 to {}* ({}*)*)({}* nonnull %1)
│   name = :ijl_array_copy
│   file = Symbol("C:/workdir/src\\array.c")
│   line = 1176
│   fromC = true
│   inlined = false
└ @ StaticCompiler
1 Like