@@ -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