diff --git a/BinaryBuilderSources.jl/src/JLLSource.jl b/BinaryBuilderSources.jl/src/JLLSource.jl index 04e5182..6f2989e 100644 --- a/BinaryBuilderSources.jl/src/JLLSource.jl +++ b/BinaryBuilderSources.jl/src/JLLSource.jl @@ -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 @@ -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 diff --git a/src/build_api/BuildTargetSpec.jl b/src/build_api/BuildTargetSpec.jl index 2349aaa..88798c5 100644 --- a/src/build_api/BuildTargetSpec.jl +++ b/src/build_api/BuildTargetSpec.jl @@ -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}-") @@ -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...