Skip to content

Commit

Permalink
try fix building non-incremental sysimages on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Nov 15, 2024
1 parent 38629b0 commit a6fc64c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,14 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
# PR: https://github.com/JuliaLang/PackageCompiler.jl/pull/930
tmp_sys_sl = joinpath(tmp, "sys." * Libdl.dlext)

compiler_source_path = joinpath(base_dir, "compiler", "compiler.jl")

@static if VERSION >= v"1.12.0-DEV.1617"
compiler_source_path = joinpath(base_dir, "Base_compiler.jl")
compiler_args = `./` # build path

Check warning on line 238 in src/PackageCompiler.jl

View check run for this annotation

Codecov / codecov/patch

src/PackageCompiler.jl#L236-L238

Added lines #L236 - L238 were not covered by tests
else
compiler_source_path = joinpath(base_dir, "compiler", "compiler.jl")
compiler_args = ``
end
# we can't strip the IR from the base sysimg, so we filter out this flag
# also presumably `--compile=all` and maybe a few others we missed here...
sysimage_build_args_strs = map(p -> "$(p...)", values(sysimage_build_args))
Expand All @@ -246,7 +252,7 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
# Create corecompiler.ji
cmd = `$(get_julia_cmd()) --cpu-target $cpu_target
--output-ji $tmp_corecompiler_ji $sysimage_build_args
$compiler_source_path`
$compiler_source_path $compiler_args`
@debug "running $cmd"

read(cmd)
Expand All @@ -263,7 +269,7 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
cmd = addenv(`$(get_julia_cmd()) --cpu-target $cpu_target
--sysimage=$tmp_corecompiler_ji
$sysimage_build_args --output-o=$tmp_sys_o
$new_sysimage_source_path`,
$new_sysimage_source_path $compiler_args`,
"JULIA_LOAD_PATH" => "@stdlib")
@debug "running $cmd"

Expand Down

0 comments on commit a6fc64c

Please sign in to comment.