@@ -232,8 +232,16 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
232
232
# PR: https://github.com/JuliaLang/PackageCompiler.jl/pull/930
233
233
tmp_sys_sl = joinpath (tmp, " sys." * Libdl. dlext)
234
234
235
- compiler_source_path = joinpath (base_dir, " compiler" , " compiler.jl" )
236
235
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
237
245
# we can't strip the IR from the base sysimg, so we filter out this flag
238
246
# also presumably `--compile=all` and maybe a few others we missed here...
239
247
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,
246
254
# Create corecompiler.ji
247
255
cmd = ` $(get_julia_cmd ()) --cpu-target $cpu_target
248
256
--output-ji $tmp_corecompiler_ji $sysimage_build_args
249
- $compiler_source_path `
257
+ $compiler_source_path $compiler_args `
250
258
@debug " running $cmd "
251
259
252
260
read (cmd)
@@ -263,7 +271,7 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
263
271
cmd = addenv (` $(get_julia_cmd ()) --cpu-target $cpu_target
264
272
--sysimage=$tmp_corecompiler_ji
265
273
$sysimage_build_args --output-o=$tmp_sys_o
266
- $new_sysimage_source_path ` ,
274
+ $new_sysimage_source_path $compiler_args ` ,
267
275
" JULIA_LOAD_PATH" => " @stdlib" )
268
276
@debug " running $cmd "
269
277
0 commit comments