Skip to content

Commit 467b90b

Browse files
Change naming convention of object files to follow what Base Julia does (#930)
* Change naming convention of object files to follow what Base Julia does * Add some comments linking to the PR and the bug report Thus, future readers of the source code will understand why we use this naming convention. [Applies suggestions from code review.] * CI: Resume testing on Intel macOS (#967) --------- Co-authored-by: Dilum Aluthge <[email protected]>
1 parent 4d9da91 commit 467b90b

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
os:
5858
- ubuntu-latest
5959
- windows-latest
60-
# - macos-13 # macos-13 = Intel. # TODO: uncomment this line once we merge #930
60+
- macos-13 # macos-13 = Intel.
6161
# TODO: uncomment the next line, so that we can start testing on macos-14:
6262
# - macos-14 # macos-14 = Apple Silicon.
6363
coverage:

src/PackageCompiler.jl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,11 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
225225
sysimg_source_path = Base.find_source_file("sysimg.jl")
226226
base_dir = dirname(sysimg_source_path)
227227
tmp_corecompiler_ji = joinpath(tmp, "corecompiler.ji")
228-
tmp_sys_o = joinpath(tmp, "sys.o")
228+
tmp_sys_o = joinpath(tmp, "sys-o.a")
229+
# This naming convention (`sys-o.a`) is necessary to make the sysimage
230+
# work on macOS.
231+
# Bug report: https://github.com/JuliaLang/PackageCompiler.jl/issues/738
232+
# PR: https://github.com/JuliaLang/PackageCompiler.jl/pull/930
229233
tmp_sys_sl = joinpath(tmp, "sys." * Libdl.dlext)
230234

231235
compiler_source_path = joinpath(base_dir, "compiler", "compiler.jl")
@@ -639,7 +643,11 @@ function create_sysimage(packages::Union{Nothing, Symbol, Vector{String}, Vector
639643
end
640644

641645
# Create the sysimage
642-
object_file = tempname() * ".o"
646+
object_file = tempname() * "-o.a"
647+
# This naming convention (`-o.a`) is necessary to make the sysimage
648+
# work on macOS.
649+
# Bug report: https://github.com/JuliaLang/PackageCompiler.jl/issues/738
650+
# PR: https://github.com/JuliaLang/PackageCompiler.jl/pull/930
643651

644652
create_sysimg_object_file(object_file, packages, packages_sysimg;
645653
project,
@@ -1428,7 +1436,7 @@ function bundle_julia_libexec(ctx, dest_dir)
14281436
p7zip_exe = basename(p7zip_path)
14291437
cp(p7zip_path, joinpath(bundle_libexec_dir, p7zip_exe))
14301438

1431-
return
1439+
return
14321440
end
14331441

14341442
function recursive_dir_size(path)

0 commit comments

Comments
 (0)