-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Converge JLL APIs a bit more #38797
Converge JLL APIs a bit more #38797
Conversation
@fingolfin Please let me know if any of these APIs don't work or are insufficient in some way. |
stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl
Outdated
Show resolved
Hide resolved
This also only addresses half of issue #38781 from my POV: there is still the issue of the missing headers... |
We can't ship the GMP headers in You can do that via something like: using GMP_jll, Pkg.Artifacts
artifacts_toml = joinpath(dirname(dirname(Base.pathof(GMP_jll))), "StdlibArtifacts.toml")
# If this file exists, it's a stdlib JLL and we must download the artifact ourselves
if isfile(artifacts_toml)
meta = artifact_meta("GMP", artifacts_toml)
hash = Base.SHA1(meta["git-tree-sha1"])
if !artifact_exists(hash)
dl_info = first(meta["download"])
download_artifact(hash, dl_info["url"], dl_info["sha256"])
end
global gmp_artifact_dir = artifact_path(hash)
else
# Otherwise, we can just use the artifact directory given to us by GMP_jll
global gmp_artifact_dir = GMP_jll.find_artifact_dir()
end |
The initial draft of Fake JLLs missed some important points in JLL API compatibility; let's close the gap somewhat, where we can. This PR adds the following exports: * `get_artifact_dir()`: returns the Julia prefix * `dev_jll()`: Throws an error * `best_wrapper`: always set to `nothing` * `get_*_path()`: returns the path of the identified library product It also converts all fake JLL modules to `baremodule`s, and sets the appropriate compiler options to minimize compilation.
5aefa5f
to
6d97a07
Compare
Good to merge, @staticfloat? |
The initial draft of Fake JLLs missed some important points in JLL API compatibility; let's close the gap somewhat, where we can. This PR adds the following exports: * `get_artifact_dir()`: returns the Julia prefix * `dev_jll()`: Throws an error * `best_wrapper`: always set to `nothing` * `get_*_path()`: returns the path of the identified library product It also converts all fake JLL modules to `baremodule`s, and sets the appropriate compiler options to minimize compilation. (cherry picked from commit d8975fa)
The initial draft of Fake JLLs missed some important points in JLL API compatibility; let's close the gap somewhat, where we can. This PR adds the following exports: * `get_artifact_dir()`: returns the Julia prefix * `dev_jll()`: Throws an error * `best_wrapper`: always set to `nothing` * `get_*_path()`: returns the path of the identified library product It also converts all fake JLL modules to `baremodule`s, and sets the appropriate compiler options to minimize compilation.
The initial draft of Fake JLLs missed some important points in JLL
API compatibility; let's close the gap somewhat, where we can. This PR
adds the following exports:
get_artifact_dir()
: returns the Julia prefixdev_jll()
: Throws an errorbest_wrapper
: always set tonothing
get_*_path()
: returns the path of the identified library productIt also converts all fake JLL modules to
baremodule
s, and sets theappropriate compiler options to minimize compilation.
Closes #38781