From 0e40a494247bec05b19d9c1149f19411ed818023 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 31 Oct 2019 21:14:27 -0400 Subject: [PATCH] z3_jll build 4.8.6+0 --- Artifacts.toml | 113 +++++++++++++++++++++ Project.toml | 10 ++ README.md | 34 +++++++ src/wrappers/aarch64-linux-gnu.jl | 83 +++++++++++++++ src/wrappers/aarch64-linux-musl.jl | 83 +++++++++++++++ src/wrappers/arm-linux-gnueabihf.jl | 83 +++++++++++++++ src/wrappers/arm-linux-musleabihf.jl | 83 +++++++++++++++ src/wrappers/i686-linux-gnu.jl | 83 +++++++++++++++ src/wrappers/i686-linux-musl.jl | 83 +++++++++++++++ src/wrappers/i686-w64-mingw32.jl | 83 +++++++++++++++ src/wrappers/powerpc64le-linux-gnu.jl | 83 +++++++++++++++ src/wrappers/x86_64-apple-darwin14.jl | 83 +++++++++++++++ src/wrappers/x86_64-linux-gnu.jl | 83 +++++++++++++++ src/wrappers/x86_64-linux-musl.jl | 83 +++++++++++++++ src/wrappers/x86_64-unknown-freebsd11.1.jl | 83 +++++++++++++++ src/wrappers/x86_64-w64-mingw32.jl | 83 +++++++++++++++ src/z3_jll.jl | 31 ++++++ 17 files changed, 1267 insertions(+) create mode 100644 Artifacts.toml create mode 100644 Project.toml create mode 100644 README.md create mode 100644 src/wrappers/aarch64-linux-gnu.jl create mode 100644 src/wrappers/aarch64-linux-musl.jl create mode 100644 src/wrappers/arm-linux-gnueabihf.jl create mode 100644 src/wrappers/arm-linux-musleabihf.jl create mode 100644 src/wrappers/i686-linux-gnu.jl create mode 100644 src/wrappers/i686-linux-musl.jl create mode 100644 src/wrappers/i686-w64-mingw32.jl create mode 100644 src/wrappers/powerpc64le-linux-gnu.jl create mode 100644 src/wrappers/x86_64-apple-darwin14.jl create mode 100644 src/wrappers/x86_64-linux-gnu.jl create mode 100644 src/wrappers/x86_64-linux-musl.jl create mode 100644 src/wrappers/x86_64-unknown-freebsd11.1.jl create mode 100644 src/wrappers/x86_64-w64-mingw32.jl create mode 100644 src/z3_jll.jl diff --git a/Artifacts.toml b/Artifacts.toml new file mode 100644 index 0000000..46a94ff --- /dev/null +++ b/Artifacts.toml @@ -0,0 +1,113 @@ +[[z3]] +arch = "armv7l" +git-tree-sha1 = "273b62be7fef1ecb24646aada25a5951c7ddcf92" +libc = "musl" +os = "linux" + + [[z3.download]] + sha256 = "c0060b7de86e6a3b20c53507bc742409bd156e8bbb1fc192c7e268d8fea9107c" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.arm-linux-musleabihf.tar.gz" +[[z3]] +arch = "i686" +git-tree-sha1 = "ba0bab2dc31d6000e8eca6cfc1ae0b5f277555cb" +os = "windows" + + [[z3.download]] + sha256 = "5deecc8fef6319aa2343712325439f568f054a32301ac8a304f248385baa9908" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.i686-w64-mingw32.tar.gz" +[[z3]] +arch = "i686" +git-tree-sha1 = "9f327f761c2209b21c54b5428a182b5c98b3a61a" +libc = "glibc" +os = "linux" + + [[z3.download]] + sha256 = "1dd7c23a9096a6bf7bb5223ec3914d3ab593d2d9cad455d5bcb87725c907cde9" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.i686-linux-gnu.tar.gz" +[[z3]] +arch = "x86_64" +git-tree-sha1 = "8656dedacbdbe276573dc092c7205e19a9b0b57f" +libc = "glibc" +os = "linux" + + [[z3.download]] + sha256 = "0d8ece74a7012d1944d7636cced1c62f21b00224a69e65fc323657e6ad3234c0" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.x86_64-linux-gnu.tar.gz" +[[z3]] +arch = "x86_64" +git-tree-sha1 = "3504745cbde167cfa54e3b15d7f687e1eafce8b5" +os = "macos" + + [[z3.download]] + sha256 = "b727c5bb6c41456d42fdc67ff61f6ac3420a4045dbfb108f3776282748f85368" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.x86_64-apple-darwin14.tar.gz" +[[z3]] +arch = "x86_64" +git-tree-sha1 = "c33f310838cfc88690ff16094e595b3030660058" +os = "freebsd" + + [[z3.download]] + sha256 = "4046b92911aa4ac5fd91d3c4266290eaae2214e17f7cc86002ee9ed140050fe2" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.x86_64-unknown-freebsd11.1.tar.gz" +[[z3]] +arch = "armv7l" +git-tree-sha1 = "7d6c5444058413db24b76599013db3776a549ebf" +libc = "glibc" +os = "linux" + + [[z3.download]] + sha256 = "7bdc27b91e44c351fb03c13cfde9b600454055eec78c2b067250af21f66003cd" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.arm-linux-gnueabihf.tar.gz" +[[z3]] +arch = "x86_64" +git-tree-sha1 = "4bbbdd215cc2c85dd8d7f433d1e488396fc2c82a" +libc = "musl" +os = "linux" + + [[z3.download]] + sha256 = "826d1d01969a1e35533770b3642f3498dd3b224f9d92a862e11c0e894fc1832e" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.x86_64-linux-musl.tar.gz" +[[z3]] +arch = "i686" +git-tree-sha1 = "528f77e3fb657b72484a1f9fbc969a0a27fa5ecf" +libc = "musl" +os = "linux" + + [[z3.download]] + sha256 = "a2c9e52a73617ca96cc5d0f58bf80cacec5f05ddb4bbc33380ba700655f30bb6" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.i686-linux-musl.tar.gz" +[[z3]] +arch = "powerpc64le" +git-tree-sha1 = "7dbddd92d44bde27691770ce5212fbdab5ec758b" +libc = "glibc" +os = "linux" + + [[z3.download]] + sha256 = "d8aefa4f0cef8072c160bf2020b3bba7c97db2c5d6627fa1d3180a11bfd5a58c" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.powerpc64le-linux-gnu.tar.gz" +[[z3]] +arch = "x86_64" +git-tree-sha1 = "af0c348e6c15bca64cb0cae5d51ebe15ef2956f4" +os = "windows" + + [[z3.download]] + sha256 = "a7087c35a21518483f7b3ec5a484c675003b0383da7bd088429686e873dd5f36" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.x86_64-w64-mingw32.tar.gz" +[[z3]] +arch = "aarch64" +git-tree-sha1 = "4b17be92c6bc91a9ba40c3a352ce0c9088d9d7c3" +libc = "glibc" +os = "linux" + + [[z3.download]] + sha256 = "d57e7561786fbbe656f382e29e1500f8b037593540c7bdac33d453eb42e34a0c" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.aarch64-linux-gnu.tar.gz" +[[z3]] +arch = "aarch64" +git-tree-sha1 = "6ae8bf5097fbc4078ced06d61063e5d18b0fa6c3" +libc = "musl" +os = "linux" + + [[z3.download]] + sha256 = "84a717239743fbf492e0c080271170c862f255518c0c61a7c4e35a4ebd601527" + url = "https://github.com/JuliaBinaryWrappers/z3_jll.jl/releases/download/z3-v4.8.6+0/z3.v4.8.6.aarch64-linux-musl.tar.gz" diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..2c6d972 --- /dev/null +++ b/Project.toml @@ -0,0 +1,10 @@ +name = "z3_jll" +uuid = "1bc4e1ec-7839-5212-8f2f-0d16b7bd09bc" +version = "4.8.6+0" + +[deps] +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[compat] +julia = "1.3" diff --git a/README.md b/README.md new file mode 100644 index 0000000..63e41b2 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# z3_jll.jl + +This is an autogenerated package constructed using [`BinaryBuilder.jl`](https://github.com/JuliaPackaging/BinaryBuilder.jl). + +## Usage + +The code bindings within this package are autogenerated from the `Products` defined within the `build_tarballs.jl` file that generated this package. For example purposes, we will assume that the following products were defined: + +```julia +products = [ + FileProduct("src/data.txt", :data_txt), + LibraryProduct("libdataproc", :libdataproc), + ExecutableProduct("mungify", :mungify_exe) +] +``` + +With such products defined, this package will contain `data_txt`, `libdataproc` and `mungify_exe` symbols exported. For `FileProduct` variables, the exported value is a string pointing to the location of the file on-disk. For `LibraryProduct` variables, it is a string corresponding to the `SONAME` of the desired library (it will have already been `dlopen()`'ed, so typical `ccall()` usage applies), and for `ExecutableProduct` variables, the exported value is a function that can be called to set appropriate environment variables. Example: + +```julia +using z3_jll + +# For file products, you can access its file location directly: +data_lines = open(data_txt, "r") do io + readlines(io) +end + +# For library products, you can use the exported variable name in `ccall()` invocations directly +num_chars = ccall((libdataproc, :count_characters), Cint, (Cstring, Cint), data_lines[1], length(data_lines[1])) + +# For executable products, you can use the exported variable name as a function that you can call +mungify_exe() do mungify_exe_path + run(`$mungify_exe_path $num_chars`) +end +``` diff --git a/src/wrappers/aarch64-linux-gnu.jl b/src/wrappers/aarch64-linux-gnu.jl new file mode 100644 index 0000000..b0918ac --- /dev/null +++ b/src/wrappers/aarch64-linux-gnu.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for aarch64-linux-gnu +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "LD_LIBRARY_PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["lib", "libz3.so"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "libz3.so.4.8" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ':', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/aarch64-linux-musl.jl b/src/wrappers/aarch64-linux-musl.jl new file mode 100644 index 0000000..1c0304b --- /dev/null +++ b/src/wrappers/aarch64-linux-musl.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for aarch64-linux-musl +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "LD_LIBRARY_PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["lib", "libz3.so"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "libz3.so.4.8" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ':', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/arm-linux-gnueabihf.jl b/src/wrappers/arm-linux-gnueabihf.jl new file mode 100644 index 0000000..3970e53 --- /dev/null +++ b/src/wrappers/arm-linux-gnueabihf.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for arm-linux-gnueabihf +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "LD_LIBRARY_PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["lib", "libz3.so"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "libz3.so.4.8" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ':', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/arm-linux-musleabihf.jl b/src/wrappers/arm-linux-musleabihf.jl new file mode 100644 index 0000000..65e1d38 --- /dev/null +++ b/src/wrappers/arm-linux-musleabihf.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for arm-linux-musleabihf +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "LD_LIBRARY_PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["lib", "libz3.so"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "libz3.so.4.8" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ':', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/i686-linux-gnu.jl b/src/wrappers/i686-linux-gnu.jl new file mode 100644 index 0000000..7e4dd2b --- /dev/null +++ b/src/wrappers/i686-linux-gnu.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for i686-linux-gnu +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "LD_LIBRARY_PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["lib", "libz3.so"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "libz3.so.4.8" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ':', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/i686-linux-musl.jl b/src/wrappers/i686-linux-musl.jl new file mode 100644 index 0000000..a511d29 --- /dev/null +++ b/src/wrappers/i686-linux-musl.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for i686-linux-musl +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "LD_LIBRARY_PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["lib", "libz3.so"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "libz3.so.4.8" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ':', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/i686-w64-mingw32.jl b/src/wrappers/i686-w64-mingw32.jl new file mode 100644 index 0000000..028cd65 --- /dev/null +++ b/src/wrappers/i686-w64-mingw32.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for i686-w64-mingw32 +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["bin", "libz3.dll"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "libz3.dll" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3.exe"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ';', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ';', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ';') + global LIBPATH = join(LIBPATH_list, ';') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/powerpc64le-linux-gnu.jl b/src/wrappers/powerpc64le-linux-gnu.jl new file mode 100644 index 0000000..e9c9775 --- /dev/null +++ b/src/wrappers/powerpc64le-linux-gnu.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for powerpc64le-linux-gnu +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "LD_LIBRARY_PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["lib", "libz3.so"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "libz3.so.4.8" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ':', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/x86_64-apple-darwin14.jl b/src/wrappers/x86_64-apple-darwin14.jl new file mode 100644 index 0000000..852718a --- /dev/null +++ b/src/wrappers/x86_64-apple-darwin14.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for x86_64-apple-darwin14 +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "DYLD_FALLBACK_LIBRARY_PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["lib", "libz3.4.8.dylib"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "@rpath/libz3.4.8.dylib" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ':', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/x86_64-linux-gnu.jl b/src/wrappers/x86_64-linux-gnu.jl new file mode 100644 index 0000000..161f492 --- /dev/null +++ b/src/wrappers/x86_64-linux-gnu.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for x86_64-linux-gnu +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "LD_LIBRARY_PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["lib", "libz3.so"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "libz3.so.4.8" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ':', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/x86_64-linux-musl.jl b/src/wrappers/x86_64-linux-musl.jl new file mode 100644 index 0000000..7cf1e06 --- /dev/null +++ b/src/wrappers/x86_64-linux-musl.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for x86_64-linux-musl +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "LD_LIBRARY_PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["lib", "libz3.so"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "libz3.so.4.8" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ':', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/x86_64-unknown-freebsd11.1.jl b/src/wrappers/x86_64-unknown-freebsd11.1.jl new file mode 100644 index 0000000..0b87282 --- /dev/null +++ b/src/wrappers/x86_64-unknown-freebsd11.1.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for x86_64-unknown-freebsd11.1 +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "LD_LIBRARY_PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["lib", "libz3.so"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "libz3.so.4.8" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ':', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ':', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ':') + global LIBPATH = join(LIBPATH_list, ':') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/wrappers/x86_64-w64-mingw32.jl b/src/wrappers/x86_64-w64-mingw32.jl new file mode 100644 index 0000000..26141ec --- /dev/null +++ b/src/wrappers/x86_64-w64-mingw32.jl @@ -0,0 +1,83 @@ +# Autogenerated wrapper script for z3_jll for x86_64-w64-mingw32 +export libz3, z3 + +## Global variables +PATH = "" +LIBPATH = "" +LIBPATH_env = "PATH" + +# Relative path to `libz3` +const libz3_splitpath = ["bin", "libz3.dll"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +libz3_path = "" + +# libz3-specific global declaration +# This will be filled out by __init__() +libz3_handle = C_NULL + +# This must be `const` so that we can use it with `ccall()` +const libz3 = "libz3.dll" + + +# Relative path to `z3` +const z3_splitpath = ["bin", "z3.exe"] + +# This will be filled out by __init__() for all products, as it must be done at runtime +z3_path = "" + +# z3-specific global declaration +function z3(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + global PATH, LIBPATH + env_mapping = Dict{String,String}() + if adjust_PATH + if !isempty(get(ENV, "PATH", "")) + env_mapping["PATH"] = string(PATH, ';', ENV["PATH"]) + else + env_mapping["PATH"] = PATH + end + end + if adjust_LIBPATH + if !isempty(get(ENV, LIBPATH_env, "")) + env_mapping[LIBPATH_env] = string(LIBPATH, ';', ENV[LIBPATH_env]) + else + env_mapping[LIBPATH_env] = LIBPATH + end + end + withenv(env_mapping...) do + f(z3_path) + end +end + + +""" +Open all libraries +""" +function __init__() + global prefix = abspath(joinpath(@__DIR__, "..")) + + # Initialize PATH and LIBPATH environment variable listings + global PATH_list, LIBPATH_list + global libz3_path = abspath(joinpath(artifact"z3", libz3_splitpath...)) + + # Manually `dlopen()` this right now so that future invocations + # of `ccall` with its `SONAME` will find this path immediately. + global libz3_handle = dlopen(libz3_path) + push!(LIBPATH_list, dirname(libz3_path)) + + global z3_path = abspath(joinpath(artifact"z3", z3_splitpath...)) + + push!(PATH_list, dirname(z3_path)) + # Filter out duplicate and empty entries in our PATH and LIBPATH entries + filter!(!isempty, unique!(PATH_list)) + filter!(!isempty, unique!(LIBPATH_list)) + global PATH = join(PATH_list, ';') + global LIBPATH = join(LIBPATH_list, ';') + + # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms + # that don't honor our "already opened" trick) + #for lp in LIBPATH_list + # push!(DL_LOAD_PATH, lp) + #end +end # __init__() + diff --git a/src/z3_jll.jl b/src/z3_jll.jl new file mode 100644 index 0000000..ca94cda --- /dev/null +++ b/src/z3_jll.jl @@ -0,0 +1,31 @@ +module z3_jll +using Pkg, Pkg.BinaryPlatforms, Pkg.Artifacts, Libdl +import Base: UUID + +# We put these inter-JLL-package API values here so that they are always defined, even if there +# is no underlying wrapper held within this JLL package. +const PATH_list = String[] +const LIBPATH_list = String[] + +# Load Artifacts.toml file +artifacts_toml = joinpath(@__DIR__, "..", "Artifacts.toml") + +# Extract all platforms +artifacts = Pkg.Artifacts.load_artifacts_toml(artifacts_toml; pkg_uuid=UUID("1bc4e1ec-7839-5212-8f2f-0d16b7bd09bc")) +platforms = [Pkg.Artifacts.unpack_platform(e, "z3", artifacts_toml) for e in artifacts["z3"]] + +# Filter platforms based on what wrappers we've generated on-disk +platforms = filter(p -> isfile(joinpath(@__DIR__, "wrappers", triplet(p) * ".jl")), platforms) + +# From the available options, choose the best platform +best_platform = select_platform(Dict(p => triplet(p) for p in platforms)) + +# Silently fail if there's no binaries for this platform +if best_platform === nothing + @debug("Unable to load z3; unsupported platform $(triplet(platform_key_abi()))") +else + # Load the appropriate wrapper + include(joinpath(@__DIR__, "wrappers", "$(best_platform).jl")) +end + +end # module z3_jll