diff --git a/src/Platforms.jl b/src/Platforms.jl index f822b67c..c0bbc3d3 100644 --- a/src/Platforms.jl +++ b/src/Platforms.jl @@ -42,6 +42,9 @@ function libabi_agnostic(p::Platform) return Platform(arch(p)::String, os(p)::String; filtered_tags...) end +platforms_match_with_sanitize(a::AnyPlatform, b::AnyPlatform) = true +platforms_match_with_sanitize(a::AnyPlatform, b::AbstractPlatform) = true +platforms_match_with_sanitize(a::AbstractPlatform, b::AnyPlatform) = true platforms_match_with_sanitize(a::AbstractPlatform, b::AbstractPlatform) = platforms_match(a, b) && sanitize(a) == sanitize(b) function platforms_match_with_sanitize(a::AbstractString, b::AbstractPlatform) diff --git a/test/platforms.jl b/test/platforms.jl index 1412acf2..6935ab8e 100644 --- a/test/platforms.jl +++ b/test/platforms.jl @@ -57,6 +57,10 @@ end # Make sure `AnyPlatform` matches all platforms we can possibly support. @test all(p -> platforms_match(AnyPlatform(), p), expand_microarchitectures(expand_gfortran_versions(expand_cxxstring_abis(supported_platforms(; experimental=true))))) + + # Make sure `AnyPlatform` matches all platforms we can possibly support. + @test all(p -> BinaryBuilderBase.platforms_match_with_sanitize(AnyPlatform(), p), + expand_microarchitectures(expand_gfortran_versions(expand_cxxstring_abis(supported_platforms(; experimental=true))))) end @testset "Target properties" begin