Skip to content

Commit

Permalink
Allow choice of target while building systemimage (#2966)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaruni96 authored Nov 2, 2023
1 parent 3676573 commit 82c112f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion system/Build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ Oscar.system("precompile.jl")
""")

sysimage=joinpath(tmp, "Oscar.$(Libdl.dlext)")
PackageCompiler.create_sysimage([:Oscar], sysimage_path=sysimage, precompile_execution_file=CO)
if !("JULIA_CPU_TARGET" in keys(ENV)) || (ENV["JULIA_CPU_TARGET"] == "")
PackageCompiler.create_sysimage([:Oscar], sysimage_path=sysimage, precompile_execution_file=CO)
else
target = ENV["JULIA_CPU_TARGET"]
PackageCompiler.create_sysimage([:Oscar], sysimage_path=sysimage, precompile_execution_file=CO; cpu_target=target)
end

println("(re)start julia as")
println("\tjulia -J $(sysimage)")

0 comments on commit 82c112f

Please sign in to comment.