Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change naming convention of object files to follow what Base Julia does #930

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 126 additions & 29 deletions examples/MyApp/Artifacts.toml
Original file line number Diff line number Diff line change
@@ -1,46 +1,143 @@
[[fooifier]]
arch = "x86_64"
git-tree-sha1 = "98d93024ca384050c59d554415b75d61e467fd8c"
[[HelloWorldC]]
arch = "aarch64"
git-tree-sha1 = "d4036700fbbf29b31f5d1d5d948547edd3b70e11"
os = "macos"

[[HelloWorldC.download]]
sha256 = "1fd55f038a73c89f4e22b437a9182421e0d31c50bd4912c719215f6a736d50f1"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.aarch64-apple-darwin.tar.gz"
[[HelloWorldC]]
arch = "aarch64"
git-tree-sha1 = "c82465bd6d0aa1369ff2fd961b73884d1f5de49a"
libc = "glibc"
os = "linux"

[[HelloWorldC.download]]
sha256 = "5bfa84332c7ee485ca8e2eee216ad9fa77b2c43d5f261baa823e301b7c789ec4"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.aarch64-linux-gnu.tar.gz"
[[HelloWorldC]]
arch = "aarch64"
git-tree-sha1 = "cb4b8c88778c6cd93b6df38ec5b95a2678434f5d"
libc = "musl"
os = "linux"

[[HelloWorldC.download]]
sha256 = "924df1c2a386f79a2727a2f989393102649a24863214f2e88cb4a677d3d22e14"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.aarch64-linux-musl.tar.gz"
[[HelloWorldC]]
arch = "armv6l"
call_abi = "eabihf"
git-tree-sha1 = "20a32b71145b67e708f63fb5880a7243727aec0f"
libc = "glibc"
os = "linux"

[[fooifier.download]]
sha256 = "5208c63a9d07e592c78f541fc13caa8cd191b11e7e77b31d407237c2b13ec391"
url = "https://github.com/staticfloat/small_bin/raw/master/libfoo/libfoo.x86_64-linux-gnu.tar.gz"
[[HelloWorldC.download]]
sha256 = "6f0997b0aad387ba6e2402530642bb4ded85b0243460d2e4b13d94f2c8340a44"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.armv6l-linux-gnueabihf.tar.gz"
[[HelloWorldC]]
arch = "armv6l"
call_abi = "eabihf"
git-tree-sha1 = "c1179604ea37fa66ee6d5d592c7bbfd1f20292c3"
libc = "musl"
os = "linux"

[[fooifier]]
[[HelloWorldC.download]]
sha256 = "0aca47bce6f09c38a7939277a593deb988123fe59f7992225a1ede8e174f1b06"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.armv6l-linux-musleabihf.tar.gz"
[[HelloWorldC]]
arch = "armv7l"
call_abi = "eabihf"
git-tree-sha1 = "0a8e7b523ef6be31311aefe9983a488616e58201"
libc = "glibc"
os = "linux"

[[HelloWorldC.download]]
sha256 = "f29f4da556d2b4ee9eaff7740aa0f9436406b75b0f1ec428e881a47ab7b7477b"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.armv7l-linux-gnueabihf.tar.gz"
[[HelloWorldC]]
arch = "armv7l"
call_abi = "eabihf"
git-tree-sha1 = "ca94b4d87f1a276066a2994733142e35046c41dd"
libc = "musl"
os = "linux"

[[HelloWorldC.download]]
sha256 = "5fb4019d6d797e5e3860cfec90cab12f6865fa624e87b51c20220a44bb94846a"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.armv7l-linux-musleabihf.tar.gz"
[[HelloWorldC]]
arch = "i686"
git-tree-sha1 = "c3a9f27382862092e064bcf4aeb3cb7190578338"
git-tree-sha1 = "cb1aefe048a6c0395b6b664695c20cb50dbec8e3"
libc = "glibc"
os = "linux"

[[fooifier.download]]
sha256 = "97655b6a218d61284723b6923d7c96e6a256fa68b9419d723c588aa24404b102"
url = "https://github.com/staticfloat/small_bin/raw/master/libfoo/libfoo.i686-linux-gnu.tar.gz"
[[HelloWorldC.download]]
sha256 = "c79def491d702590b9c82599d40c4e755251dbb49669d0290f9a1a7bf1d91a1a"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.i686-linux-gnu.tar.gz"
[[HelloWorldC]]
arch = "i686"
git-tree-sha1 = "b50220be02e9c839749f91a70694ae68c2712c8e"
libc = "musl"
os = "linux"

[[fooifier]]
[[HelloWorldC.download]]
sha256 = "6aecc06cf803ad16703744610deb243a21b39e19ae1951a38977610881698f9e"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.i686-linux-musl.tar.gz"
[[HelloWorldC]]
arch = "i686"
git-tree-sha1 = "0f7597f042d16d438f9684e20ca57ea22e4e15c1"
os = "windows"

[[HelloWorldC.download]]
sha256 = "5f14f5ade1314e777432bd85cd075ae9d31e28352e646f90adf0444a7a54f76b"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.i686-w64-mingw32.tar.gz"
[[HelloWorldC]]
arch = "powerpc64le"
git-tree-sha1 = "5e9c87fc4e3372c27a77061a49d97fa5002df0e4"
libc = "glibc"
os = "linux"

[[HelloWorldC.download]]
sha256 = "e2a728b29124fc7408d6e47cc6fc943d0336d1386e56a3775a0665b34528881b"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.powerpc64le-linux-gnu.tar.gz"
[[HelloWorldC]]
arch = "x86_64"
git-tree-sha1 = "f413ff2438a4e9e9dd69b23c35ca30de6af069cc"
git-tree-sha1 = "09ed293f6f5ebfcaf90eef2b4d45c402d834d33e"
os = "macos"

[[fooifier.download]]
sha256 = "fcc268772d6f21d65b45fcf3854a3142679b78e53c7673dac26c95d6ccc89a24"
url = "https://github.com/staticfloat/small_bin/raw/master/libfoo/libfoo.x86_64-apple-darwin14.tar.gz"
[[HelloWorldC.download]]
sha256 = "9feabdcb8341d37d0c8b1acb5840e1c9d524632c5aff40c05b5e0e1d621a7e30"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.x86_64-apple-darwin.tar.gz"
[[HelloWorldC]]
arch = "x86_64"
git-tree-sha1 = "8c8251b0c21615bce0701995eded26ac7697b5cc"
libc = "glibc"
os = "linux"

[[fooifier]]
[[HelloWorldC.download]]
sha256 = "974f7e1d1cdbebad149e51fed4f1b7c6a0b5ccfa350f7d252dfcf66c2dbf9f63"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.x86_64-linux-gnu.tar.gz"
[[HelloWorldC]]
arch = "x86_64"
git-tree-sha1 = "1351b831192db9091d97e9b4bc84231ade05d210"
os = "windows"
git-tree-sha1 = "cfaaf0517421585561e3b30dd6f53f6c14b2835f"
libc = "musl"
os = "linux"

[[fooifier.download]]
sha256 = "7f8939e9529835b83810d3ae7e2556f6e002d571f619894e54ece42ea5262b7f"
url = "https://github.com/staticfloat/small_bin/raw/master/libfoo/libfoo.x86_64-w64-mingw32.tar.gz"
[[HelloWorldC.download]]
sha256 = "25d3d6ecc753f4dbbcaab0db7b6c20b29b0a79b0c31f7a26a0cf18c365d27809"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.x86_64-linux-musl.tar.gz"
[[HelloWorldC]]
arch = "x86_64"
git-tree-sha1 = "9adaeee1375ffd66613afe71f111dad3a88fb302"
os = "freebsd"

[[fooifier]]
arch = "aarch64"
git-tree-sha1 = "281cbe3dd65aa4bdb887bfb29651da500c81e242"
os = "linux"
[[HelloWorldC.download]]
sha256 = "8e59a00a9238d1605af09ec3a76c8bb5ad012b5621f5ccb7de6cf73f89fbf18f"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.x86_64-unknown-freebsd.tar.gz"
[[HelloWorldC]]
arch = "x86_64"
git-tree-sha1 = "59955b315ce95abd82f71d29389be3b734b14821"
os = "windows"

[[fooifier.download]]
sha256 = "36886ac25cf5678c01fe20630b413f9354b7a3721c6a2c2043162f7ebd147ff5"
url = "https://github.com/staticfloat/small_bin/raw/master/libfoo/libfoo.aarch64-linux-gnu.tar.gz"
[[HelloWorldC.download]]
sha256 = "47bbead5cbdfca1b23544b1b398e8a2194c78ab8a772ca3075084c4a9ab75fb7"
url = "https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl/releases/download/HelloWorldC-v1.3.0+0/HelloWorldC.v1.3.0.x86_64-w64-mingw32.tar.gz"
6 changes: 3 additions & 3 deletions examples/MyApp/src/MyApp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const outputo = begin
o == C_NULL ? "ok" : unsafe_string(o)
end

fooifier_path() = joinpath(artifact"fooifier", "bin", "fooifier" * (Sys.iswindows() ? ".exe" : ""))
hello_world_path() = joinpath(artifact"HelloWorldC", "bin", "hello_world" * (Sys.iswindows() ? ".exe" : ""))

function julia_main()::Cint
try
Expand Down Expand Up @@ -61,8 +61,8 @@ function real_main()
@show is_crayons_loaded()

println("Running the artifact")
res = read(`$(fooifier_path()) 5 10`, String)
println("The result of 2*5^2 - 10 == $res")
res = readchomp(`$(hello_world_path())`)
println("Artifact printed: $res")

@show unsafe_string(Base.JLOptions().image_file)
@show Example.domath(5)
Expand Down
6 changes: 3 additions & 3 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ 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")
tmp_sys_sl = joinpath(tmp, "sys." * Libdl.dlext)

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

# Create the sysimage
object_file = tempname() * ".o"
object_file = tempname() * "-o.a"

create_sysimg_object_file(object_file, packages, packages_sysimg;
project,
Expand Down Expand Up @@ -1411,7 +1411,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
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ end
tmp_app_source_dir = joinpath(tmp, "MyApp")
cp(app_source_dir, tmp_app_source_dir)
if is_julia_1_6
# Issue #706 "Cannot locate artifact 'LLVMExtra'" on 1.6 so remove
# Issue #706 "Cannot locate artifact 'LLVMExtra'" on 1.6 so remove
remove_llvmextras(joinpath(tmp_app_source_dir, "Project.toml"))
end
try
Expand Down Expand Up @@ -117,7 +117,7 @@ end
# Check jll package runs
@test occursin("Hello, World!", app_output)
# Check artifact runs
@test occursin("The result of 2*5^2 - 10 == 40.000000", app_output)
@test occursin("Artifact printed: Hello, World!", app_output)
# Check artifact gets run from the correct place
@test occursin("HelloWorld artifact at $(realpath(app_compiled_dir))", app_output)
# Check ARGS
Expand Down
Loading