File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -127,17 +127,21 @@ function get_musl_dso_type(musl_version::VersionNumber)
127127 end
128128end
129129
130+ _musl_version = Ref {Union{Nothing,VersionNumber}} (nothing )
130131function get_musl_version ()
132+ if _musl_version[] != = nothing
133+ return _musl_version[]
134+ end
135+
131136 stderr = IOBuffer ()
132137 run (pipeline (ignorestatus (` /lib/libc.musl-x86_64.so.1 --version` ); stdout = Base. devnull , stderr ))
133138
134- version = nothing
135139 for line in split (String (take! (stderr )), " \n " )
136140 if startswith (line, " Version " )
137- version = parse (VersionNumber, line[9 : end ])
141+ _musl_version[] = parse (VersionNumber, line[9 : end ])
138142 end
139143 end
140- return version
144+ return _musl_version[]
141145end
142146
143147function parse_soname (dso:: musl_dso )
You can’t perform that action at this time.
0 commit comments