Skip to content
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
7 changes: 6 additions & 1 deletion src/auditor/dynamic_linkage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,12 @@ function update_linkage(prefix::Prefix, platform::AbstractPlatform, path::Abstra
end
return rp
end
add_rpath = rp -> `$install_name_tool -add_rpath $(rp) $(rel_path)`
add_rpath = rp -> begin
# Remove paths starting with `/workspace`: they will not work outisde of the
# build environment and only create noise when debugging.
startswith(rp, "/workspace") && return
`$install_name_tool -add_rpath $(rp) $(rel_path)`
end
relink = (op, np) -> `$install_name_tool -change $(op) $(np) $(rel_path)`
elseif Sys.islinux(platform) || Sys.isbsd(platform)
normalize_rpath = rp -> begin
Expand Down
6 changes: 5 additions & 1 deletion test/auditing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,11 @@ end
libfoo_rpaths = Auditor._rpaths(joinpath(testdir, "lib", "libfoo.$(platform_dlext(platform))"))
@test (Sys.isapple(platform) ? "@loader_path" : "\$ORIGIN") * "/qux" in libfoo_rpaths
# Currently we don't filter out absolute rpaths for macOS libraries, no good.
@test length(libfoo_rpaths) == 1 broken=Sys.isapple(platform)
#TODO
if !(length(libfoo_rpaths) == 1)
@show libfoo_rpaths
end
@test length(libfoo_rpaths) == 1
end
end

Expand Down
Loading