Skip to content

Make rename_wrapper_prefixes work for HostToolsToolchain #22

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

Open
wants to merge 1 commit into
base: main
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
6 changes: 4 additions & 2 deletions BinaryBuilderSources.jl/src/JLLSource.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ function prepare(jlls::Vector{JLLSource};
for (prefix, jlls_slice) in platform_jlls_by_prefix
art_paths = collect_artifact_paths([jll.package for jll in jlls_slice]; platform, project_dir, pkg_depot=depot, verbose)
for jll in jlls_slice
pkg = only([pkg for (pkg, _) in art_paths if pkg.uuid == jll.package.uuid])
pkgs = [pkg for (pkg, _) in art_paths if pkg.uuid == jll.package.uuid]
isempty(pkgs) && error("No artifacts found for JLL $(jll.package.name)!")
pkg = only(pkgs)
# Update `jll.package` with things from `pkg`
if pkg.version != Pkg.Types.VersionSpec()
jll.package.version = pkg.version
Expand Down Expand Up @@ -219,7 +221,7 @@ end
# JLLSources are in a directory together.
function content_hash(jll::JLLSource)
checkprepared!("content_hash", jll)

entries = [(basename(apath), hex2bytes(basename(apath)), TreeArchival.mode_dir) for apath in jll.artifact_paths]
return SHA1Hash(TreeArchival.tree_node_hash(SHA.SHA1_CTX, entries))
end
Expand Down
3 changes: 2 additions & 1 deletion src/build_api/BuildTargetSpec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function rename_wrapper_prefixes(name::String, flags::Set{Symbol}, pw::Platforml
wrapper_prefixes = String[]
# env_prefixes control the naming of environment variables that point to our wrappers
env_prefixes = String[]

# if `name` is "host", this makes a "host-x86_64-linux-gnu-gcc" wrapper.
push!(wrapper_prefixes, string(name, "-\${triplet}-"))
push!(wrapper_prefixes, "\${triplet}-")
Expand All @@ -89,6 +89,7 @@ function rename_wrapper_prefixes(name::String, flags::Set{Symbol}, pw::Platforml
end
return pw
end
rename_wrapper_prefixes(name::String, flags::Set{Symbol}, host::HostToolsToolchain) = host

function alter_toolchain(target_prefix::String, pw::PlatformlessWrapper{CToolchain})
# Alter this object to contain extra flags, prefixes, etc...
Expand Down