Skip to content

Commit 0832190

Browse files
authored
[Runner] Fix name of Musl libc symlink (#195)
1 parent 7b1c319 commit 0832190

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Runner.jl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,18 @@ function map_rust_target(p::AbstractPlatform)
819819
end
820820
end
821821

822+
# Match
823+
# https://github.com/JuliaPackaging/Yggdrasil/blob/c58c5abe64e177bc6ed6aa775aff1fefbfe85517/0_RootFS/gcc_common.jl#L342-L352
824+
function map_musl_arch(p::AbstractPlatform)
825+
if arch(p) == "i686"
826+
return "i386"
827+
elseif startswith(arch(p), "arm")
828+
return "armhf"
829+
else
830+
return arch(p)
831+
end
832+
end
833+
822834
"""
823835
platform_envs(platform::AbstractPlatform, src_name::AbstractString;
824836
host_platform = default_host_platform,
@@ -1152,7 +1164,7 @@ function runner_setup!(workspaces, mappings, workspace_root, verbose, kwargs, pl
11521164
dir = mktempdir()
11531165
sysroot_libdir = joinpath(dir, "$(aatriplet(platform))/sys-root/usr/lib")
11541166
mkpath(sysroot_libdir)
1155-
symlink("libc.so", joinpath(sysroot_libdir, "libc.musl-$(map_rust_arch(platform)).so.1"))
1167+
symlink("libc.so", joinpath(sysroot_libdir, "libc.musl-$(map_musl_arch(platform)).so.1"))
11561168
push!(mappings, dir => "/opt/$(aatriplet(platform))/nonce")
11571169
end
11581170

0 commit comments

Comments
 (0)