Skip to content

Toolchains: Try re-enabling compressed debug sections test #21

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

Merged
merged 18 commits into from
Jun 10, 2025
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode/
LocalPreferences.toml
.buildkite/logs/
.aider*
34 changes: 23 additions & 11 deletions BinaryBuilderAuditor.jl/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ uuid = "316c416d-4527-6863-7465-466137743047"
version = "0.1.0"

[[deps.BinaryBuilderToolchains]]
deps = ["Artifacts", "BinaryBuilderPlatformExtensions", "BinaryBuilderSources", "HistoricalStdlibVersions", "JLLPrefixes", "NetworkOptions", "Pkg", "PrecompileTools", "Reexport", "SHA", "Scratch"]
deps = ["Artifacts", "BinaryBuilderPlatformExtensions", "BinaryBuilderSources", "HistoricalStdlibVersions", "JLLPrefixes", "LazyJLLWrappers", "NetworkOptions", "Pkg", "PrecompileTools", "Reexport", "SHA", "Scratch"]
path = "../BinaryBuilderToolchains.jl"
uuid = "33566f4c-336c-3150-6d30-4374274e6143"
version = "0.2.0"
Expand Down Expand Up @@ -91,10 +91,10 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
version = "1.11.0"

[[deps.Git]]
deps = ["Git_jll"]
git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e"
deps = ["Git_jll", "JLLWrappers", "OpenSSH_jll"]
git-tree-sha1 = "2230a9cc32394b11a3b3aa807a382e3bbab1198c"
uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
version = "1.3.1"
version = "1.4.0"

[[deps.Git_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"]
Expand All @@ -103,12 +103,12 @@ uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb"
version = "2.49.0+0"

[[deps.HistoricalStdlibVersions]]
deps = ["Pkg"]
git-tree-sha1 = "fc8e78e29ecfdc7da3cfc290fa0d4a67e1915958"
deps = ["Pkg", "PrecompileTools"]
git-tree-sha1 = "ab6fc1fd927d3c95a8357ef7c98859bcb0611478"
repo-rev = "main"
repo-url = "https://github.com/JuliaPackaging/HistoricalStdlibVersions.jl.git"
uuid = "6df8b67a-e8a0-4029-b4b7-ac196fe72102"
version = "2.0.1"
version = "2.0.3"

[[deps.InteractiveUtils]]
deps = ["Markdown"]
Expand Down Expand Up @@ -143,6 +143,12 @@ path = "../KeywordArgumentExtraction.jl"
uuid = "45533465-3150-2073-4772-41774b207255"
version = "1.0.0"

[[deps.LazyJLLWrappers]]
deps = ["Artifacts", "Libdl", "Pkg", "Preferences", "TOML"]
git-tree-sha1 = "4f476ce1143b5eb0308976791f1ed0e7e17ad585"
uuid = "21706172-204c-4d4f-5420-656854206f44"
version = "1.0.3"

[[deps.LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
Expand Down Expand Up @@ -218,16 +224,22 @@ git-tree-sha1 = "09b1fe6ff16e6587fa240c165347474322e77cf1"
uuid = "d8793406-e978-5875-9003-1fc021f44a92"
version = "0.4.4"

[[deps.OpenSSH_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"]
git-tree-sha1 = "cb7acd5d10aff809b4d0191dfe1956c2edf35800"
uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b"
version = "10.0.1+0"

[[deps.OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "a9697f1d06cc3eb3fb3ad49cc67f2cfabaac31ea"
git-tree-sha1 = "9216a80ff3682833ac4b733caa8c00390620ba5d"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "3.0.16+0"
version = "3.5.0+0"

[[deps.OrderedCollections]]
git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd"
git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.8.0"
version = "1.8.1"

[[deps.PCRE2_jll]]
deps = ["Artifacts", "Libdl"]
Expand Down
3 changes: 2 additions & 1 deletion BinaryBuilderAuditor.jl/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ julia = "1.6"
[extras]
BinaryBuilderToolchains = "33566f4c-336c-3150-6d30-4374274e6143"
JLLPrefixes = "afc68a34-7891-4c5a-9da1-1c62935e7b0d"
LazyJLLWrappers = "21706172-204c-4d4f-5420-656854206f44"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TreeArchival = "216c6a2e-6c61-7669-6863-726165657274"

[targets]
test = ["BinaryBuilderToolchains", "JLLPrefixes", "Test", "TreeArchival"]
test = ["BinaryBuilderToolchains", "JLLPrefixes", "LazyJLLWrappers", "Test", "TreeArchival"]
8 changes: 8 additions & 0 deletions BinaryBuilderAuditor.jl/src/SystemLibraries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,17 @@ function is_system_library(soname::AbstractString, platform::AbstractPlatform)
]
csl_libs = [
"libgcc_s.1.dylib",
"libgcc_s.1.1.dylib",
]
return lowercase(soname) ∈ vcat(ignore_libs, csl_libs)
elseif os(platform) == "windows"
# Windows has a symbol versioning scheme that stores the version in a DLL symbol-forwarding
# library that really just forwards on to ucrt as a backend [0]. We ignore all of these.
# [0]: https://mingwpy.github.io/ucrt.html
if startswith(lowercase(soname), "api-ms-win-crt-")
return true
end

runtime_libs = [
# Core runtime libs
"ntdll.dll",
Expand Down
4 changes: 2 additions & 2 deletions BinaryBuilderAuditor.jl/src/passes/DynamicLinkage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function resolve_dynamic_links!(scan::ScanResult,
dep_soname_map = Dict{String,Tuple{Symbol,Symbol}}()
for (jll_name, libs) in dep_libs
for lib in libs
dep_soname_map[lib.soname] = (Symbol(string(jll_name, "_jll")), lib.varname)
dep_soname_map[basename(lib.soname)] = (Symbol(string(jll_name, "_jll")), lib.varname)
end
end

Expand Down Expand Up @@ -147,7 +147,7 @@ function rpaths_consistent!(scan::ScanResult,
soname_locator = copy(scan.soname_locator)
for (_, libs) in dep_libs
for lib in libs
soname_locator[lib.soname] = lib.path
soname_locator[basename(lib.soname)] = lib.path
end
end

Expand Down
2 changes: 1 addition & 1 deletion BinaryBuilderAuditor.jl/test/passes/DynamicLinkageTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ for target_platform in (Platform("x86_64", "linux"), Platform("aarch64", "macos"
end
end
end
end
end
1 change: 0 additions & 1 deletion BinaryBuilderAuditor.jl/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ include("passes/LicenseTests.jl")
include("passes/LibrarySONAMETests.jl")
include("passes/DynamicLinkageTests.jl")


@testset "audit!" begin
platform = CrossPlatform(BBHostPlatform() => HostPlatform())
toolchain = CToolchain(platform; use_ccache=false)
Expand Down
16 changes: 11 additions & 5 deletions BinaryBuilderGitUtils.jl/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
version = "2.6.5+0"

[[deps.Git]]
deps = ["Git_jll"]
git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e"
deps = ["Git_jll", "JLLWrappers", "OpenSSH_jll"]
git-tree-sha1 = "2230a9cc32394b11a3b3aa807a382e3bbab1198c"
uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
version = "1.3.1"
version = "1.4.0"

[[deps.Git_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"]
Expand Down Expand Up @@ -68,11 +68,17 @@ path = "../MultiHashParsing.jl"
uuid = "73786568-6863-756d-6873-6168796e616d"
version = "0.1.0"

[[deps.OpenSSH_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"]
git-tree-sha1 = "cb7acd5d10aff809b4d0191dfe1956c2edf35800"
uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b"
version = "10.0.1+0"

[[deps.OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "a9697f1d06cc3eb3fb3ad49cc67f2cfabaac31ea"
git-tree-sha1 = "9216a80ff3682833ac4b733caa8c00390620ba5d"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "3.0.16+0"
version = "3.5.0+0"

[[deps.PCRE2_jll]]
deps = ["Artifacts", "Libdl"]
Expand Down
4 changes: 2 additions & 2 deletions BinaryBuilderPlatformExtensions.jl/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
version = "1.11.0"

[[deps.OrderedCollections]]
git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd"
git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.8.0"
version = "1.8.1"

[[deps.PrecompileTools]]
deps = ["Preferences"]
Expand Down
38 changes: 37 additions & 1 deletion BinaryBuilderPlatformExtensions.jl/src/PlatformProperties.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export macos_version, nbits, proc_family, exeext, dlext
export macos_version, macos_kernel_version, nbits, proc_family, exeext, dlext

function macos_version(kernel_version::Integer)
# See https://en.wikipedia.org/wiki/Darwin_(operating_system)#Release_history
Expand All @@ -13,9 +13,35 @@ function macos_version(kernel_version::Integer)
19 => "10.15",
20 => "11.0",
21 => "12.0",
22 => "13.0",
23 => "14.0",
24 => "15.0",
)
return get(kernel_to_macos, kernel_version, nothing)
end
macos_version(v::VersionNumber) = macos_version(v.major)

"""
macos_kernel_version(v::VersionNumber)

Return the kernel version from a macOS VersionNumber, e.g. when given
`10.10`` return `14`. If given a VersionNumber outside of what we
understand, return the closest valid number.
"""
function macos_kernel_version(v::VersionNumber)
if v.major < 10
return 12
elseif v.major == 10
if v.minor <= 8
return 12
else
return min(12 + (v.minor - 8), 19)
end
else
return 20 + (v.major - 11)
end
end
macos_kernel_version(s::String) = macos_kernel_version(VersionNumber(s))

"""
macos_version(p::AbstractPlatform)
Expand All @@ -38,6 +64,16 @@ function macos_version(p::AbstractPlatform)
return macos_version(os_version(p))
end

function macos_kernel_version(p::AbstractPlatform)
if os(p) != "macos"
return nothing
end
if os_version(p) === nothing
return nothing
end
return Int(os_version(p).major)
end


"""
nbits(p::AbstractPlatform)
Expand Down
2 changes: 1 addition & 1 deletion BinaryBuilderPlatformExtensions.jl/src/Utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export gcc_platform, gcc_target_triplet
Strip out any tags that are not the basic annotations like `libc` and `call_abi`.
"""
function gcc_platform(p::Platform)
keeps = ("libc", "call_abi", "os_version")
keeps = ("libc", "call_abi")
filtered_tags = Dict{Symbol,String}(Symbol(k) => v for (k, v) in tags(p) if k ∈ keeps)
return Platform(arch(p)::String, os(p)::String; filtered_tags...)
end
Expand Down
12 changes: 12 additions & 0 deletions BinaryBuilderPlatformExtensions.jl/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@ using BinaryBuilderPlatformExtensions, Test, Base.BinaryPlatforms, Artifacts
end
end

@testset "macos_version" begin
@test macos_version(Platform("x86_64", "macos")) === nothing
@test macos_version(Platform("x86_64", "macos"; os_version="14")) === "10.10"
@test macos_version(Platform("x86_64", "macos"; os_version="20")) === "11.0"
for idx in 12:24
p = Platform("aarch64", "macos"; os_version=string(idx))
@test macos_version(p) !== nothing
@test macos_kernel_version(p) == idx
@test macos_kernel_version(macos_version(p)) == idx
end
end

@testset "nbits" begin
for p in [Platform("i686", "linux"), Platform("i686", "windows"), Platform("armv7l", "linux")]
@test nbits(p) == 32
Expand Down
20 changes: 13 additions & 7 deletions BinaryBuilderProducts.jl/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
version = "1.11.0"

[[deps.Git]]
deps = ["Git_jll"]
git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e"
deps = ["Git_jll", "JLLWrappers", "OpenSSH_jll"]
git-tree-sha1 = "2230a9cc32394b11a3b3aa807a382e3bbab1198c"
uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
version = "1.3.1"
version = "1.4.0"

[[deps.Git_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"]
Expand Down Expand Up @@ -198,16 +198,22 @@ version = "0.1.0"
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
version = "1.2.0"

[[deps.OpenSSH_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"]
git-tree-sha1 = "cb7acd5d10aff809b4d0191dfe1956c2edf35800"
uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b"
version = "10.0.1+0"

[[deps.OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "a9697f1d06cc3eb3fb3ad49cc67f2cfabaac31ea"
git-tree-sha1 = "9216a80ff3682833ac4b733caa8c00390620ba5d"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "3.0.16+0"
version = "3.5.0+0"

[[deps.OrderedCollections]]
git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd"
git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.8.0"
version = "1.8.1"

[[deps.PCRE2_jll]]
deps = ["Artifacts", "Libdl"]
Expand Down
16 changes: 11 additions & 5 deletions BinaryBuilderSources.jl/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
version = "1.11.0"

[[deps.Git]]
deps = ["Git_jll"]
git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e"
deps = ["Git_jll", "JLLWrappers", "OpenSSH_jll"]
git-tree-sha1 = "2230a9cc32394b11a3b3aa807a382e3bbab1198c"
uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
version = "1.3.1"
version = "1.4.0"

[[deps.Git_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"]
Expand Down Expand Up @@ -141,11 +141,17 @@ version = "0.1.0"
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
version = "1.2.0"

[[deps.OpenSSH_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"]
git-tree-sha1 = "cb7acd5d10aff809b4d0191dfe1956c2edf35800"
uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b"
version = "10.0.1+0"

[[deps.OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "a9697f1d06cc3eb3fb3ad49cc67f2cfabaac31ea"
git-tree-sha1 = "9216a80ff3682833ac4b733caa8c00390620ba5d"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "3.0.16+0"
version = "3.5.0+0"

[[deps.PCRE2_jll]]
deps = ["Artifacts", "Libdl"]
Expand Down
11 changes: 9 additions & 2 deletions BinaryBuilderSources.jl/src/JLLSource.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ function JLLSource(package::PkgSpec, platform::AbstractPlatform; target = "")
noabspath!(target)
return JLLSource(
package,
platform,
# Make sure our artifact matching happens as if we're a host platform,
# e.g. `os_version` gets interpreted as a lower bound, etc...
HostPlatform(platform),
string(target),
String[],
)
Expand Down Expand Up @@ -204,7 +206,12 @@ function deploy(jlls::Vector{JLLSource}, prefix::String)
install_path = joinpath(prefix, target)
mkpath(install_path)
paths = unique(vcat((jll.artifact_paths for jll in target_jlls)...))
deploy_artifact_paths(install_path, unique(vcat((jll.artifact_paths for jll in target_jlls)...)))
try
deploy_artifact_paths(install_path, paths)
catch
@error("Failed to deploy", install_path, paths)
rethrow()
end
end
end

Expand Down
Loading