static-julia icon indicating copy to clipboard operation
static-julia copied to clipboard

How to detect static build?

Open samoconnor opened this issue 6 years ago • 0 comments

What is the best (standard?) way to detect a static-julia build ? Perhaps there should be Base.is_static_julia() -> Bool ?

I currently have the following at the bottom of my main module to check for the outputo option:

if Base.JLOptions().outputo != Ptr{UInt8}(0)

    Base.@ccallable function julia_main(args::Vector{String})::Cint
        init(args)
        return 0
    end

else
    init(ARGS)
end

end # mymodule

samoconnor avatar Sep 29 '17 00:09 samoconnor