Skip to content

Commit 72387f9

Browse files
authored
Fix building fresh (non-incremental) sysimages on Julia nightly (Julia 1.12) (#1002)
1 parent 38629b0 commit 72387f9

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.github/workflows/ci.nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717

1818
jobs:
1919
test-nightly:
20-
timeout-minutes: 90
20+
timeout-minutes: 150
2121
runs-on: ${{ matrix.github-runner }}
2222
strategy:
2323
max-parallel: 5 # leave space for other runs in the JuliaLang org, given these tests are long

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
steps:
4040
- run: exit 0
4141
test:
42-
timeout-minutes: 90
42+
timeout-minutes: 150
4343
runs-on: ${{ matrix.github-runner }}
4444
strategy:
4545
max-parallel: 20 # leave space for other runs in the JuliaLang org, given these tests are long

src/PackageCompiler.jl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,16 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
232232
# PR: https://github.com/JuliaLang/PackageCompiler.jl/pull/930
233233
tmp_sys_sl = joinpath(tmp, "sys." * Libdl.dlext)
234234

235-
compiler_source_path = joinpath(base_dir, "compiler", "compiler.jl")
236235

236+
@static if VERSION >= v"1.12.0-DEV.1617"
237+
compiler_source_path = joinpath(base_dir, "Base_compiler.jl")
238+
buildroot = ""
239+
dataroot = relpath(joinpath(Sys.BINDIR, Base.DATAROOTDIR), base_dir) * "/"
240+
compiler_args = `--buildroot $buildroot --dataroot $dataroot` # build path
241+
else
242+
compiler_source_path = joinpath(base_dir, "compiler", "compiler.jl")
243+
compiler_args = ``
244+
end
237245
# we can't strip the IR from the base sysimg, so we filter out this flag
238246
# also presumably `--compile=all` and maybe a few others we missed here...
239247
sysimage_build_args_strs = map(p -> "$(p...)", values(sysimage_build_args))
@@ -246,7 +254,7 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
246254
# Create corecompiler.ji
247255
cmd = `$(get_julia_cmd()) --cpu-target $cpu_target
248256
--output-ji $tmp_corecompiler_ji $sysimage_build_args
249-
$compiler_source_path`
257+
$compiler_source_path $compiler_args`
250258
@debug "running $cmd"
251259

252260
read(cmd)
@@ -263,7 +271,7 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
263271
cmd = addenv(`$(get_julia_cmd()) --cpu-target $cpu_target
264272
--sysimage=$tmp_corecompiler_ji
265273
$sysimage_build_args --output-o=$tmp_sys_o
266-
$new_sysimage_source_path`,
274+
$new_sysimage_source_path $compiler_args`,
267275
"JULIA_LOAD_PATH" => "@stdlib")
268276
@debug "running $cmd"
269277

0 commit comments

Comments
 (0)