Skip to content

Commit 951dc0f

Browse files
committed
Pass "" as the BUILDROOT for Julia 1.12+
1 parent 38629b0 commit 951dc0f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/PackageCompiler.jl

+6-1
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,15 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
260260
new_sysimage_source_path = joinpath(tmp, "sysimage_packagecompiler_$(uuid1()).jl")
261261
write(new_sysimage_source_path, new_sysimage_content)
262262
try
263+
# The final positional argument of "" is to pass BUILDROOT="" to Base.jl.
264+
# In Julia 1.11 and earlier, this positional argument will be ignored.
265+
# In Julia 1.12 and later, this positional argument will be picked up by Base.jl,
266+
# and Base.jl will set Base.BUILDROOT to "".
267+
# https://github.com/JuliaLang/PackageCompiler.jl/issues/989
263268
cmd = addenv(`$(get_julia_cmd()) --cpu-target $cpu_target
264269
--sysimage=$tmp_corecompiler_ji
265270
$sysimage_build_args --output-o=$tmp_sys_o
266-
$new_sysimage_source_path`,
271+
$new_sysimage_source_path ""`,
267272
"JULIA_LOAD_PATH" => "@stdlib")
268273
@debug "running $cmd"
269274

0 commit comments

Comments
 (0)