fix: sysimage for julials
This commit is contained in:
parent
9a137c8bd2
commit
2f81ec6035
2 changed files with 5 additions and 7 deletions
|
@ -11,12 +11,12 @@ Pkg.add("PackageCompiler")
|
||||||
|
|
||||||
# add extra dependencies
|
# add extra dependencies
|
||||||
# these packages are manually collected
|
# these packages are manually collected
|
||||||
pkg_extra = ["Logging", "Sockets", "DataStructures", "Tar", "ArgTools", "Dates", "Downloads", "TOML", "JSONRPC", "SymbolServer"]
|
pkg_extra = ["Logging", "Sockets", "DataStructures", "Tar", "ArgTools", "Dates", "Downloads", "TOML", "JSONRPC", "SymbolServer", "CSTParser", "StaticLint", "JSON"]
|
||||||
Pkg.add(pkg_extra)
|
Pkg.add(pkg_extra)
|
||||||
@info "added dependencies"
|
@info "added dependencies"
|
||||||
|
|
||||||
# Extra package to be executed in precompiled code
|
# Extra package to be executed in precompiled code
|
||||||
pkg_precompiled = []
|
pkg_precompiled = ["Pkg"]
|
||||||
|
|
||||||
# save pkgs to be used for precompile functions with traced script
|
# save pkgs to be used for precompile functions with traced script
|
||||||
out_path = joinpath(Pkg.project().path |> dirname, "precompile_exec_head.jl")
|
out_path = joinpath(Pkg.project().path |> dirname, "precompile_exec_head.jl")
|
||||||
|
@ -24,10 +24,8 @@ out_path = joinpath(Pkg.project().path |> dirname, "precompile_exec_head.jl")
|
||||||
open(out_path, "w") do io
|
open(out_path, "w") do io
|
||||||
println(io, "using LanguageServer")
|
println(io, "using LanguageServer")
|
||||||
println(io, "using " * join(pkg_extra, ", "))
|
println(io, "using " * join(pkg_extra, ", "))
|
||||||
# println(io, "using " * join(pkg_precompiled, ", "))
|
println(io, "using " * join(pkg_precompiled, ", "))
|
||||||
if Sys.iswindows()
|
|
||||||
println(io, "import FileWatching")
|
println(io, "import FileWatching")
|
||||||
end
|
|
||||||
end
|
end
|
||||||
@info "finished writing precompile head file"
|
@info "finished writing precompile head file"
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ cd(project_path) do
|
||||||
end |> join
|
end |> join
|
||||||
read("precompile_exec_head.jl", String) * compile_traces |> (b -> write("precompile_exec.jl", b))
|
read("precompile_exec_head.jl", String) * compile_traces |> (b -> write("precompile_exec.jl", b))
|
||||||
@info "compiling sysimage..."
|
@info "compiling sysimage..."
|
||||||
create_sysimage(["LanguageServer"], sysimage_path = "sys-ls.so", precompile_execution_file = ["precompile_exec.jl"])'
|
create_sysimage(["LanguageServer"], sysimage_path = "sys-ls.so", precompile_execution_file = ["precompile_exec.jl"])
|
||||||
@info "post precompile"
|
@info "post precompile"
|
||||||
run(`julia --project=. -J sys-ls.so -e 'using Pkg; Pkg.precompile()'`)
|
run(`julia --project=. -J sys-ls.so -e 'using Pkg; Pkg.precompile()'`)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue