@@ -101,12 +101,12 @@ function get_deps_readelf(lib_path::String)
101
101
end
102
102
103
103
104
-
104
+ skip = false
105
105
# On linux, we need `readelf` available, otherwise we refuse to attempt this
106
106
if Sys. islinux () || Sys. isfreebsd ()
107
107
if Sys. which (" readelf" ) === nothing
108
108
@debug (" Silently skipping stdlib_dependencies.jl as `readelf` not available." )
109
- exit ( 0 )
109
+ skip = true
110
110
end
111
111
get_deps = get_deps_readelf
112
112
strip_soversion = strip_soversion_linux
@@ -115,63 +115,66 @@ elseif Sys.isapple()
115
115
# On macOS, we need `otool` available
116
116
if Sys. which (" otool" ) === nothing
117
117
@debug (" Silently skipping stdlib_dependencies.jl as `otool` not available." )
118
- exit ( 0 )
118
+ skip = true
119
119
end
120
120
get_deps = get_deps_otool
121
121
strip_soversion = strip_soversion_macos
122
122
is_system_lib = is_system_lib_macos
123
123
else
124
124
@debug (" Don't know how to run `stdlib_dependencies.jl` on this platform" )
125
- exit ( 0 )
125
+ skip = true
126
126
end
127
127
128
- # Iterate over all JLL stdlibs, check their lazy libraries to ensure
129
- # that they list all valid library dependencies, avoiding a situation
130
- # where the JLL wrapper code has fallen out of sync with the binaries
131
- # themselves.
132
- @testset " Stdlib JLL dependency check" begin
133
- for (_, (stdlib_name, _)) in Pkg. Types. stdlibs ()
134
- if ! endswith (stdlib_name, " _jll" )
135
- continue
136
- end
137
-
138
- # Import the stdlib, skip it if it's not available on this platform
139
- m = eval (Meta. parse (" import $(stdlib_name) ; $(stdlib_name) " ))
140
- if ! Base. invokelatest (getproperty (m, :is_available ))
141
- continue
142
- end
143
-
144
- for prop_name in names (m)
145
- prop = getproperty (m, prop_name)
146
- if isa (prop, Libdl. LazyLibrary)
147
- lib_path = dlpath (prop)
148
- lazy_lib_deps = strip_soversion .(basename .(dlpath .(prop. dependencies)))
149
- real_lib_deps = filter (! is_system_lib, get_deps (lib_path))
150
-
151
- # See if there are missing dependencies in the lazy library deps
152
- missing_deps = setdiff (real_lib_deps, lazy_lib_deps)
153
- extraneous_deps = setdiff (lazy_lib_deps, real_lib_deps)
154
-
155
- # We expect there to be no missing or extraneous deps
156
- deps_mismatch = ! isempty (missing_deps) || ! isempty (extraneous_deps)
157
-
158
- # This is a manually-managed special case
159
- if stdlib_name == " libblastrampoline_jll" &&
160
- prop_name == :libblastrampoline &&
161
- extraneous_deps == [" libopenblas64_" ]
162
- deps_mismatch = false
163
- end
128
+ if ! skip
129
+ # Iterate over all JLL stdlibs, check their lazy libraries to ensure
130
+ # that they list all valid library dependencies, avoiding a situation
131
+ # where the JLL wrapper code has fallen out of sync with the binaries
132
+ # themselves.
133
+ @testset " Stdlib JLL dependency check" begin
134
+ for (_, (stdlib_name, _)) in Pkg. Types. stdlibs ()
135
+ if ! endswith (stdlib_name, " _jll" )
136
+ continue
137
+ end
164
138
165
- @test ! deps_mismatch
139
+ # Import the stdlib, skip it if it's not available on this platform
140
+ m = eval (Meta. parse (" import $(stdlib_name) ; $(stdlib_name) " ))
141
+ if ! Base. invokelatest (getproperty (m, :is_available ))
142
+ continue
143
+ end
166
144
167
- # Print out the deps mismatch if we find one
168
- if deps_mismatch
169
- @warn (" Dependency mismatch" ,
170
- jll= stdlib_name,
171
- library= string (prop_name),
172
- missing_deps= join (missing_deps, " , " ),
173
- extraneous_deps= join (extraneous_deps, " , " ),
174
- )
145
+ for prop_name in names (m)
146
+ prop = getproperty (m, prop_name)
147
+ if isa (prop, Libdl. LazyLibrary)
148
+ lib_path = dlpath (prop)
149
+ lazy_lib_deps = strip_soversion .(basename .(dlpath .(prop. dependencies)))
150
+ real_lib_deps = filter (! is_system_lib, get_deps (lib_path))
151
+
152
+ # See if there are missing dependencies in the lazy library deps
153
+ missing_deps = setdiff (real_lib_deps, lazy_lib_deps)
154
+ extraneous_deps = setdiff (lazy_lib_deps, real_lib_deps)
155
+
156
+ # We expect there to be no missing or extraneous deps
157
+ deps_mismatch = ! isempty (missing_deps) || ! isempty (extraneous_deps)
158
+
159
+ # This is a manually-managed special case
160
+ if stdlib_name == " libblastrampoline_jll" &&
161
+ prop_name == :libblastrampoline &&
162
+ extraneous_deps == [" libopenblas64_" ]
163
+ deps_mismatch = false
164
+ end
165
+
166
+ @test ! deps_mismatch
167
+
168
+ # Print out the deps mismatch if we find one
169
+ if deps_mismatch
170
+ @warn (" Dependency mismatch" ,
171
+ jll= stdlib_name,
172
+ library= string (prop_name),
173
+ missing_deps= join (missing_deps, " , " ),
174
+ extraneous_deps= join (extraneous_deps, " , " ),
175
+ actual_deps= join (real_lib_deps, " , " ),
176
+ )
177
+ end
175
178
end
176
179
end
177
180
end
0 commit comments