Skip to content

Commit

Permalink
Change naming convention of object files to follow what Base Julia do…
Browse files Browse the repository at this point in the history
…es (#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]>
  • Loading branch information
gbaraldi and DilumAluthge authored Oct 16, 2024
1 parent 4d9da91 commit 467b90b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
os:
- ubuntu-latest
- windows-latest
# - macos-13 # macos-13 = Intel. # TODO: uncomment this line once we merge #930
- macos-13 # macos-13 = Intel.
# TODO: uncomment the next line, so that we can start testing on macos-14:
# - macos-14 # macos-14 = Apple Silicon.
coverage:
Expand Down
14 changes: 11 additions & 3 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
sysimg_source_path = Base.find_source_file("sysimg.jl")
base_dir = dirname(sysimg_source_path)
tmp_corecompiler_ji = joinpath(tmp, "corecompiler.ji")
tmp_sys_o = joinpath(tmp, "sys.o")
tmp_sys_o = joinpath(tmp, "sys-o.a")
# This naming convention (`sys-o.a`) is necessary to make the sysimage
# work on macOS.
# Bug report: https://github.com/JuliaLang/PackageCompiler.jl/issues/738
# PR: https://github.com/JuliaLang/PackageCompiler.jl/pull/930
tmp_sys_sl = joinpath(tmp, "sys." * Libdl.dlext)

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

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

create_sysimg_object_file(object_file, packages, packages_sysimg;
project,
Expand Down Expand Up @@ -1428,7 +1436,7 @@ function bundle_julia_libexec(ctx, dest_dir)
p7zip_exe = basename(p7zip_path)
cp(p7zip_path, joinpath(bundle_libexec_dir, p7zip_exe))

return
return
end

function recursive_dir_size(path)
Expand Down

0 comments on commit 467b90b

Please sign in to comment.