Skip to content
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

Fill out LIBPATH_list and PATH_list in fake JLLs #39507

Merged
merged 1 commit into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libgcc_s_handle = dlopen(libgcc_s)
global libgcc_s_path = dlpath(libgcc_s_handle)
global libgfortran_handle = dlopen(libgfortran)
Expand Down
1 change: 1 addition & 0 deletions stdlib/GMP_jll/src/GMP_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libgmp_handle = dlopen(libgmp)
global libgmp_path = dlpath(libgmp_handle)
global libgmpxx_handle = dlopen(libgmpxx)
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibCURL_jll/src/LibCURL_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libcurl_handle = dlopen(libcurl)
global libcurl_path = dlpath(libcurl_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibGit2_jll/src/LibGit2_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libgit2_handle = dlopen(libgit2)
global libgit2_path = dlpath(libgit2_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const libosxunwind = "@rpath/libosxunwind.dylib"
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
# We only dlopen something on MacOS
@static if Sys.isapple()
global libosxunwind_handle = dlopen(libosxunwind)
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibSSH2_jll/src/LibSSH2_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libssh2_handle = dlopen(libssh2)
global libssh2_path = dlpath(libssh2_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibUV_jll/src/LibUV_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libuv_handle = dlopen(libuv)
global libuv_path = dlpath(libuv_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/LibUnwind_jll/src/LibUnwind_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const libunwind = "libunwind.so.8"
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
# We only do something on Linux/FreeBSD
@static if Sys.islinux() || Sys.isfreebsd()
global libunwind_handle = dlopen(libunwind)
Expand Down
1 change: 1 addition & 0 deletions stdlib/MPFR_jll/src/MPFR_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libmpfr_handle = dlopen(libmpfr)
global libmpfr_path = dlpath(libmpfr_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libmbedcrypto_handle = dlopen(libmbedcrypto)
global libmbedcrypto_path = dlpath(libmbedcrypto_handle)
global libmbedtls_handle = dlopen(libmbedtls)
Expand Down
4 changes: 4 additions & 0 deletions stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ baremodule MozillaCACerts_jll
using Base
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]

# These get calculated in __init__()
PATH = Ref("")
LIBPATH = Ref("")
Expand All @@ -15,6 +18,7 @@ cacert = ""
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global cacert = normpath(Sys.BINDIR::String, Base.DATAROOTDIR, "julia", "cert.pem")
end

Expand Down
1 change: 1 addition & 0 deletions stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libopenblas_handle = dlopen(libopenblas)
global libopenblas_path = dlpath(libopenblas_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/OpenLibm_jll/src/OpenLibm_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libopenlibm_handle = dlopen(libopenlibm)
global libopenlibm_path = dlpath(libopenlibm_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/PCRE2_jll/src/PCRE2_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libpcre2_8_handle = dlopen(libpcre2_8)
global libpcre2_8_path = dlpath(libpcre2_8_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libamd_handle = dlopen(libamd)
global libamd_path = dlpath(libamd_handle)
global libbtf_handle = dlopen(libbtf)
Expand Down
1 change: 1 addition & 0 deletions stdlib/Zlib_jll/src/Zlib_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libz_handle = dlopen(libz)
global libz_path = dlpath(libz_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/dSFMT_jll/src/dSFMT_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libdSFMT_handle = dlopen(libdSFMT)
global libdSFMT_path = dlpath(libdSFMT_handle)
end
Expand Down
2 changes: 2 additions & 0 deletions stdlib/libLLVM_jll/src/libLLVM_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libLLVM_handle = dlopen(libLLVM)
global libLLVM_path = dlpath(libLLVM_handle)
end
Expand Down
1 change: 1 addition & 0 deletions stdlib/nghttp2_jll/src/nghttp2_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
global libnghttp2_handle = dlopen(libnghttp2)
global libnghttp2_path = dlpath(libnghttp2_handle)
end
Expand Down
3 changes: 3 additions & 0 deletions stdlib/p7zip_jll/src/p7zip_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ end
function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia")
push!(LIBPATH_list, LIBPATH[])
init_p7zip_path()
global PATH[] = dirname(p7zip_path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for global here? Also, why isn't PATH a const?

push!(PATH_list, PATH[])
end

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
Expand Down