Skip to content

Run __init__() even in sysimage builds #1407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/LinearAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,8 @@ function lbt_openblas_onload_callback()
end
BLAS.lbt_set_num_threads(nthreads)
end

return nothing
end

function __init__()
Expand All @@ -849,4 +851,7 @@ function __init__()
libblastrampoline_jll.add_dependency!(OpenBLAS_jll, libopenblas, lbt_openblas_onload_callback)
end

# Register eagerly, so that LinearAlgebra is available for sysimage builds (incl. `--trim`)
libblastrampoline_jll.add_dependency!(OpenBLAS_jll, libopenblas, lbt_openblas_onload_callback)

end # module LinearAlgebra