Skip to content

Commit e378767

Browse files
authored
Merge pull request #37658 from JuliaLang/sf/bp_libstdcxx_parsing
[BinaryPlatforms]: Make `libstdcxx` parsing faster and more compatible
2 parents 4a6d7bf + 9c18543 commit e378767

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)