Skip to content

Commit

Permalink
Fix building fresh (non-incremental) sysimages on Julia nightly (Juli…
Browse files Browse the repository at this point in the history
…a 1.12) (#1002)
  • Loading branch information
KristofferC authored Nov 21, 2024
1 parent 38629b0 commit 72387f9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:

jobs:
test-nightly:
timeout-minutes: 90
timeout-minutes: 150
runs-on: ${{ matrix.github-runner }}
strategy:
max-parallel: 5 # leave space for other runs in the JuliaLang org, given these tests are long
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
steps:
- run: exit 0
test:
timeout-minutes: 90
timeout-minutes: 150
runs-on: ${{ matrix.github-runner }}
strategy:
max-parallel: 20 # leave space for other runs in the JuliaLang org, given these tests are long
Expand Down
14 changes: 11 additions & 3 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,16 @@ 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")
buildroot = ""
dataroot = relpath(joinpath(Sys.BINDIR, Base.DATAROOTDIR), base_dir) * "/"
compiler_args = `--buildroot $buildroot --dataroot $dataroot` # build path
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 +254,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 +271,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 72387f9

Please sign in to comment.