Skip to content

Commit 9c18543

Browse files
committed
[BinaryPlatforms]: Make libstdcxx parsing faster and more compatible
Previously, we had some trouble parsing these out as actual integers, but other cleanups have made this a much easier endeavour, and one that will fix some bugs with very new libstdc++ versions.
1 parent 4a6d7bf commit 9c18543

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

base/binaryplatforms.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,8 +694,7 @@ const libgfortran_version_mapping = Dict(
694694
)
695695
const libstdcxx_version_mapping = Dict{String,String}(
696696
"libstdcxx_nothing" => "",
697-
# This is sadly easier than parsing out the digit directly
698-
("libstdcxx$(idx)" => "-libstdcxx$(idx)" for idx in 18:26)...,
697+
"libstdcxx" => "-libstdcxx\\d+",
699698
)
700699
const cxxstring_abi_mapping = Dict(
701700
"cxxstring_nothing" => "",
@@ -745,7 +744,7 @@ function Base.parse(::Type{Platform}, triplet::AbstractString; validate_strict::
745744
if startswith(k, "libgfortran")
746745
return VersionNumber(parse(Int,k[12:end]))
747746
elseif startswith(k, "libstdcxx")
748-
return VersionNumber(3, 4, parse(Int,k[10:end]))
747+
return VersionNumber(3, 4, parse(Int,m[k][11:end]))
749748
else
750749
return k
751750
end

0 commit comments

Comments
 (0)