@@ -232,8 +232,14 @@ 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
+ compiler_args = ` ./` # build path
239
+ else
240
+ compiler_source_path = joinpath (base_dir, " compiler" , " compiler.jl" )
241
+ compiler_args = ` `
242
+ end
237
243
# we can't strip the IR from the base sysimg, so we filter out this flag
238
244
# also presumably `--compile=all` and maybe a few others we missed here...
239
245
sysimage_build_args_strs = map (p -> " $(p... ) " , values (sysimage_build_args))
@@ -246,7 +252,7 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
246
252
# Create corecompiler.ji
247
253
cmd = ` $(get_julia_cmd ()) --cpu-target $cpu_target
248
254
--output-ji $tmp_corecompiler_ji $sysimage_build_args
249
- $compiler_source_path `
255
+ $compiler_source_path $compiler_args `
250
256
@debug " running $cmd "
251
257
252
258
read (cmd)
@@ -263,7 +269,7 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
263
269
cmd = addenv (` $(get_julia_cmd ()) --cpu-target $cpu_target
264
270
--sysimage=$tmp_corecompiler_ji
265
271
$sysimage_build_args --output-o=$tmp_sys_o
266
- $new_sysimage_source_path ` ,
272
+ $new_sysimage_source_path $compiler_args ` ,
267
273
" JULIA_LOAD_PATH" => " @stdlib" )
268
274
@debug " running $cmd "
269
275
0 commit comments