Skip to content

Commit

Permalink
allow compiling stdlib jlls & precompile __init__'s
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Mar 11, 2024
1 parent 7024b73 commit aa03b71
Show file tree
Hide file tree
Showing 22 changed files with 21 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule CompilerSupportLibraries_jll
using Base, Libdl, Base.BinaryPlatforms
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -68,6 +67,7 @@ function __init__()
LIBPATH[] = dirname(libgcc_s_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/GMP_jll/src/GMP_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## dummy stub for https://github.com/JuliaBinaryWrappers/GMP_jll.jl
baremodule GMP_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -39,6 +38,7 @@ function __init__()
LIBPATH[] = dirname(libgmp_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/LLD_jll/src/LLD_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule LLD_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -95,6 +94,7 @@ function __init__()
end
LIBPATH[] = join(LIBPATH_list, pathsep)
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/LLVMLibUnwind_jll/src/LLVMLibUnwind_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule LLVMLibUnwind_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand All @@ -30,6 +29,7 @@ function __init__()
push!(LIBPATH_list, LIBPATH[])
end
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/LibCURL_jll/src/LibCURL_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule LibCURL_jll
using Base, Libdl, nghttp2_jll
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -33,6 +32,7 @@ function __init__()
LIBPATH[] = dirname(libcurl_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/LibGit2_jll/src/LibGit2_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule LibGit2_jll
using Base, Libdl, MbedTLS_jll, LibSSH2_jll
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -33,6 +32,7 @@ function __init__()
LIBPATH[] = dirname(libgit2_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/LibSSH2_jll/src/LibSSH2_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule LibSSH2_jll
using Base, Libdl, MbedTLS_jll
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -33,6 +32,7 @@ function __init__()
LIBPATH[] = dirname(libssh2_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})


# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
Expand Down
1 change: 0 additions & 1 deletion stdlib/LibUV_jll/src/LibUV_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule LibUV_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

# NOTE: This file is currently empty, as we link libuv statically for now.

Expand Down
2 changes: 1 addition & 1 deletion stdlib/LibUnwind_jll/src/LibUnwind_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule LibUnwind_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand All @@ -30,6 +29,7 @@ function __init__()
push!(LIBPATH_list, LIBPATH[])
end
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/MPFR_jll/src/MPFR_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## dummy stub for https://github.com/JuliaBinaryWrappers/MPFR_jll.jl
baremodule MPFR_jll
using Base, Libdl, GMP_jll
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -32,6 +31,7 @@ function __init__()
LIBPATH[] = dirname(libmpfr_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule MbedTLS_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -47,6 +46,7 @@ function __init__()
LIBPATH[] = dirname(libmbedtls_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule MozillaCACerts_jll
using Base
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand All @@ -19,6 +18,7 @@ function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global cacert = normpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "cert.pem")
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ using Base, Libdl, Base.BinaryPlatforms
# using CompilerSupportLibraries_jll
# Because of this however, we have to manually load the libraries we
# _do_ care about, namely libgfortran
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -73,6 +72,7 @@ function __init__()
LIBPATH[] = dirname(libopenblas_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/OpenLibm_jll/src/OpenLibm_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## dummy stub for https://github.com/JuliaBinaryWrappers/OpenLibm_jll.jl
baremodule OpenLibm_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -32,6 +31,7 @@ function __init__()
LIBPATH[] = dirname(libopenlibm_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/PCRE2_jll/src/PCRE2_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## dummy stub for https://github.com/JuliaBinaryWrappers/PCRE2_jll.jl
baremodule PCRE2_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -32,6 +31,7 @@ function __init__()
LIBPATH[] = dirname(libpcre2_8_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## dummy stub for https://github.com/JuliaBinaryWrappers/SuiteSparse_jll.jl
baremodule SuiteSparse_jll
using Base, Libdl, libblastrampoline_jll
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -110,6 +109,7 @@ function __init__()
end
global artifact_dir = dirname(Sys.BINDIR)
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/Zlib_jll/src/Zlib_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## dummy stub for https://github.com/JuliaBinaryWrappers/Zlib_jll.jl
baremodule Zlib_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -32,6 +31,7 @@ function __init__()
LIBPATH[] = dirname(libz_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/dSFMT_jll/src/dSFMT_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule dSFMT_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -33,6 +32,7 @@ function __init__()
LIBPATH[] = dirname(libdSFMT_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/libLLVM_jll/src/libLLVM_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule libLLVM_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -33,6 +32,7 @@ function __init__()
LIBPATH[] = dirname(libLLVM_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/libblastrampoline_jll/src/libblastrampoline_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

baremodule libblastrampoline_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -34,6 +33,7 @@ function __init__()
LIBPATH[] = dirname(libblastrampoline_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/nghttp2_jll/src/nghttp2_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## dummy stub for https://github.com/JuliaBinaryWrappers/nghttp2_jll.jl
baremodule nghttp2_jll
using Base, Libdl
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -32,6 +31,7 @@ function __init__()
LIBPATH[] = dirname(libnghttp2_path)
push!(LIBPATH_list, LIBPATH[])
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down
2 changes: 1 addition & 1 deletion stdlib/p7zip_jll/src/p7zip_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## dummy stub for https://github.com/JuliaBinaryWrappers/p7zip_jll.jl
baremodule p7zip_jll
using Base
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
const LIBPATH_list = String[]
Expand Down Expand Up @@ -88,6 +87,7 @@ function __init__()
append!(LIBPATH_list, [joinpath(Sys.BINDIR, Base.LIBDIR, "julia"), joinpath(Sys.BINDIR, Base.LIBDIR)])
LIBPATH[] = join(LIBPATH_list, pathsep)
end
precompile(Tuple{typeof(__init__)})

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
# For instance, `find_artifact_dir()` won't actually be the artifact directory, because
Expand Down

0 comments on commit aa03b71

Please sign in to comment.