Skip to content

Commit ea7a52a

Browse files
authored
Use @static if in CompilerSupportLibraries_jll.__init__() (JuliaLang#61516)
Hopefully enough to fix JuliaC on `aarch64-linux` (https://buildkite.com/julialang/julia-master/builds/56266#019d6367-fc8d-4806-a1f1-00ec67370c77/L1315-L1319): ``` Error #2: unresolved call from statement string( getproperty( libquadmath::Any, :path::Symbol )::Any )::Any   Stacktrace: [1] __init__() @ CompilerSupportLibraries_jll ./CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl:158 ```
1 parent 7a7058e commit ea7a52a

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,13 @@ end
134134

135135
# Conform to LazyJLLWrappers API
136136
function eager_mode()
137-
if @isdefined(libatomic)
138-
dlopen(libatomic)
139-
end
137+
dlopen(libatomic)
140138
dlopen(libgcc_s)
141139
dlopen(libgomp)
142-
if @isdefined libquadmath
140+
@static if @isdefined libquadmath
143141
dlopen(libquadmath)
144142
end
145-
if @isdefined libssp
143+
@static if @isdefined libssp
146144
dlopen(libssp)
147145
end
148146
dlopen(libgfortran)
@@ -154,10 +152,10 @@ function __init__()
154152
global libatomic_path = string(libatomic.path)
155153
global libgcc_s_path = string(libgcc_s.path)
156154
global libgomp_path = string(libgomp.path)
157-
if @isdefined libquadmath_path
155+
@static if @isdefined libquadmath_path
158156
global libquadmath_path = string(libquadmath.path)
159157
end
160-
if @isdefined libssp_path
158+
@static if @isdefined libssp_path
161159
global libssp_path = string(libssp.path)
162160
end
163161
global libgfortran_path = string(libgfortran.path)

0 commit comments

Comments
 (0)