Skip to content

Commit 3d23853

Browse files
committed
CompilerSupportLibraries_jll build 0.2.0+0
0 parents  commit 3d23853

File tree

43 files changed

+4041
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4041
-0
lines changed

Artifacts.toml

Lines changed: 378 additions & 0 deletions
Large diffs are not rendered by default.

Project.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name = "CompilerSupportLibraries_jll"
2+
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
3+
version = "0.2.0+0"
4+
5+
[deps]
6+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
7+
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
8+
9+
[compat]
10+
julia = "1.3"

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# CompilerSupportLibraries_jll.jl
2+
3+
This is an autogenerated package constructed using [`BinaryBuilder.jl`](https://github.com/JuliaPackaging/BinaryBuilder.jl).
4+
5+
## Usage
6+
7+
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:
8+
9+
```julia
10+
products = [
11+
FileProduct("src/data.txt", :data_txt),
12+
LibraryProduct("libdataproc", :libdataproc),
13+
ExecutableProduct("mungify", :mungify_exe)
14+
]
15+
```
16+
17+
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:
18+
19+
```julia
20+
using CompilerSupportLibraries_jll
21+
22+
# For file products, you can access its file location directly:
23+
data_lines = open(data_txt, "r") do io
24+
readlines(io)
25+
end
26+
27+
# For library products, you can use the exported variable name in `ccall()` invocations directly
28+
num_chars = ccall((libdataproc, :count_characters), Cint, (Cstring, Cint), data_lines[1], length(data_lines[1]))
29+
30+
# For executable products, you can use the exported variable name as a function that you can call
31+
mungify_exe() do mungify_exe_path
32+
run(`$mungify_exe_path $num_chars`)
33+
end
34+
```
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module CompilerSupportLibraries_jll
2+
using Pkg, Pkg.BinaryPlatforms, Pkg.Artifacts, Libdl
3+
import Base: UUID
4+
5+
# We put these inter-JLL-package API values here so that they are always defined, even if there
6+
# is no underlying wrapper held within this JLL package.
7+
const PATH_list = String[]
8+
const LIBPATH_list = String[]
9+
10+
# Load Artifacts.toml file
11+
artifacts_toml = joinpath(@__DIR__, "..", "Artifacts.toml")
12+
13+
# Extract all platforms
14+
artifacts = Pkg.Artifacts.load_artifacts_toml(artifacts_toml; pkg_uuid=UUID("e66e0078-7015-5450-92f7-15fbd957f2ae"))
15+
platforms = [Pkg.Artifacts.unpack_platform(e, "CompilerSupportLibraries", artifacts_toml) for e in artifacts["CompilerSupportLibraries"]]
16+
17+
# Filter platforms based on what wrappers we've generated on-disk
18+
platforms = filter(p -> isfile(joinpath(@__DIR__, "wrappers", triplet(p) * ".jl")), platforms)
19+
20+
# From the available options, choose the best platform
21+
best_platform = select_platform(Dict(p => triplet(p) for p in platforms))
22+
23+
# Silently fail if there's no binaries for this platform
24+
if best_platform === nothing
25+
@debug("Unable to load CompilerSupportLibraries; unsupported platform $(triplet(platform_key_abi()))")
26+
else
27+
# Load the appropriate wrapper
28+
include(joinpath(@__DIR__, "wrappers", "$(best_platform).jl"))
29+
end
30+
31+
end # module CompilerSupportLibraries_jll
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Autogenerated wrapper script for CompilerSupportLibraries_jll for aarch64-linux-gnu-libgfortran3
2+
export libgcc_s, libgfortran, libstdcxx
3+
4+
## Global variables
5+
PATH = ""
6+
LIBPATH = ""
7+
LIBPATH_env = "LD_LIBRARY_PATH"
8+
9+
# Relative path to `libgcc_s`
10+
const libgcc_s_splitpath = ["lib", "libgcc_s.so"]
11+
12+
# This will be filled out by __init__() for all products, as it must be done at runtime
13+
libgcc_s_path = ""
14+
15+
# libgcc_s-specific global declaration
16+
# This will be filled out by __init__()
17+
libgcc_s_handle = C_NULL
18+
19+
# This must be `const` so that we can use it with `ccall()`
20+
const libgcc_s = "libgcc_s.so.1"
21+
22+
23+
# Relative path to `libgfortran`
24+
const libgfortran_splitpath = ["lib", "libgfortran.so"]
25+
26+
# This will be filled out by __init__() for all products, as it must be done at runtime
27+
libgfortran_path = ""
28+
29+
# libgfortran-specific global declaration
30+
# This will be filled out by __init__()
31+
libgfortran_handle = C_NULL
32+
33+
# This must be `const` so that we can use it with `ccall()`
34+
const libgfortran = "libgfortran.so.3"
35+
36+
37+
# Relative path to `libstdcxx`
38+
const libstdcxx_splitpath = ["lib", "libstdc++.so"]
39+
40+
# This will be filled out by __init__() for all products, as it must be done at runtime
41+
libstdcxx_path = ""
42+
43+
# libstdcxx-specific global declaration
44+
# This will be filled out by __init__()
45+
libstdcxx_handle = C_NULL
46+
47+
# This must be `const` so that we can use it with `ccall()`
48+
const libstdcxx = "libstdc++.so.6"
49+
50+
51+
"""
52+
Open all libraries
53+
"""
54+
function __init__()
55+
global prefix = abspath(joinpath(@__DIR__, ".."))
56+
57+
# Initialize PATH and LIBPATH environment variable listings
58+
global PATH_list, LIBPATH_list
59+
global libgcc_s_path = abspath(joinpath(artifact"CompilerSupportLibraries", libgcc_s_splitpath...))
60+
61+
# Manually `dlopen()` this right now so that future invocations
62+
# of `ccall` with its `SONAME` will find this path immediately.
63+
global libgcc_s_handle = dlopen(libgcc_s_path)
64+
push!(LIBPATH_list, dirname(libgcc_s_path))
65+
66+
global libgfortran_path = abspath(joinpath(artifact"CompilerSupportLibraries", libgfortran_splitpath...))
67+
68+
# Manually `dlopen()` this right now so that future invocations
69+
# of `ccall` with its `SONAME` will find this path immediately.
70+
global libgfortran_handle = dlopen(libgfortran_path)
71+
push!(LIBPATH_list, dirname(libgfortran_path))
72+
73+
global libstdcxx_path = abspath(joinpath(artifact"CompilerSupportLibraries", libstdcxx_splitpath...))
74+
75+
# Manually `dlopen()` this right now so that future invocations
76+
# of `ccall` with its `SONAME` will find this path immediately.
77+
global libstdcxx_handle = dlopen(libstdcxx_path)
78+
push!(LIBPATH_list, dirname(libstdcxx_path))
79+
80+
# Filter out duplicate and empty entries in our PATH and LIBPATH entries
81+
filter!(!isempty, unique!(PATH_list))
82+
filter!(!isempty, unique!(LIBPATH_list))
83+
global PATH = join(PATH_list, ':')
84+
global LIBPATH = join(LIBPATH_list, ':')
85+
86+
# Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms
87+
# that don't honor our "already opened" trick)
88+
#for lp in LIBPATH_list
89+
# push!(DL_LOAD_PATH, lp)
90+
#end
91+
end # __init__()
92+
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Autogenerated wrapper script for CompilerSupportLibraries_jll for aarch64-linux-gnu-libgfortran4
2+
export libgcc_s, libgfortran, libstdcxx
3+
4+
## Global variables
5+
PATH = ""
6+
LIBPATH = ""
7+
LIBPATH_env = "LD_LIBRARY_PATH"
8+
9+
# Relative path to `libgcc_s`
10+
const libgcc_s_splitpath = ["lib", "libgcc_s.so"]
11+
12+
# This will be filled out by __init__() for all products, as it must be done at runtime
13+
libgcc_s_path = ""
14+
15+
# libgcc_s-specific global declaration
16+
# This will be filled out by __init__()
17+
libgcc_s_handle = C_NULL
18+
19+
# This must be `const` so that we can use it with `ccall()`
20+
const libgcc_s = "libgcc_s.so.1"
21+
22+
23+
# Relative path to `libgfortran`
24+
const libgfortran_splitpath = ["lib", "libgfortran.so"]
25+
26+
# This will be filled out by __init__() for all products, as it must be done at runtime
27+
libgfortran_path = ""
28+
29+
# libgfortran-specific global declaration
30+
# This will be filled out by __init__()
31+
libgfortran_handle = C_NULL
32+
33+
# This must be `const` so that we can use it with `ccall()`
34+
const libgfortran = "libgfortran.so.4"
35+
36+
37+
# Relative path to `libstdcxx`
38+
const libstdcxx_splitpath = ["lib", "libstdc++.so"]
39+
40+
# This will be filled out by __init__() for all products, as it must be done at runtime
41+
libstdcxx_path = ""
42+
43+
# libstdcxx-specific global declaration
44+
# This will be filled out by __init__()
45+
libstdcxx_handle = C_NULL
46+
47+
# This must be `const` so that we can use it with `ccall()`
48+
const libstdcxx = "libstdc++.so.6"
49+
50+
51+
"""
52+
Open all libraries
53+
"""
54+
function __init__()
55+
global prefix = abspath(joinpath(@__DIR__, ".."))
56+
57+
# Initialize PATH and LIBPATH environment variable listings
58+
global PATH_list, LIBPATH_list
59+
global libgcc_s_path = abspath(joinpath(artifact"CompilerSupportLibraries", libgcc_s_splitpath...))
60+
61+
# Manually `dlopen()` this right now so that future invocations
62+
# of `ccall` with its `SONAME` will find this path immediately.
63+
global libgcc_s_handle = dlopen(libgcc_s_path)
64+
push!(LIBPATH_list, dirname(libgcc_s_path))
65+
66+
global libgfortran_path = abspath(joinpath(artifact"CompilerSupportLibraries", libgfortran_splitpath...))
67+
68+
# Manually `dlopen()` this right now so that future invocations
69+
# of `ccall` with its `SONAME` will find this path immediately.
70+
global libgfortran_handle = dlopen(libgfortran_path)
71+
push!(LIBPATH_list, dirname(libgfortran_path))
72+
73+
global libstdcxx_path = abspath(joinpath(artifact"CompilerSupportLibraries", libstdcxx_splitpath...))
74+
75+
# Manually `dlopen()` this right now so that future invocations
76+
# of `ccall` with its `SONAME` will find this path immediately.
77+
global libstdcxx_handle = dlopen(libstdcxx_path)
78+
push!(LIBPATH_list, dirname(libstdcxx_path))
79+
80+
# Filter out duplicate and empty entries in our PATH and LIBPATH entries
81+
filter!(!isempty, unique!(PATH_list))
82+
filter!(!isempty, unique!(LIBPATH_list))
83+
global PATH = join(PATH_list, ':')
84+
global LIBPATH = join(LIBPATH_list, ':')
85+
86+
# Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms
87+
# that don't honor our "already opened" trick)
88+
#for lp in LIBPATH_list
89+
# push!(DL_LOAD_PATH, lp)
90+
#end
91+
end # __init__()
92+
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Autogenerated wrapper script for CompilerSupportLibraries_jll for aarch64-linux-gnu-libgfortran5
2+
export libgcc_s, libgfortran, libstdcxx
3+
4+
## Global variables
5+
PATH = ""
6+
LIBPATH = ""
7+
LIBPATH_env = "LD_LIBRARY_PATH"
8+
9+
# Relative path to `libgcc_s`
10+
const libgcc_s_splitpath = ["lib", "libgcc_s.so"]
11+
12+
# This will be filled out by __init__() for all products, as it must be done at runtime
13+
libgcc_s_path = ""
14+
15+
# libgcc_s-specific global declaration
16+
# This will be filled out by __init__()
17+
libgcc_s_handle = C_NULL
18+
19+
# This must be `const` so that we can use it with `ccall()`
20+
const libgcc_s = "libgcc_s.so.1"
21+
22+
23+
# Relative path to `libgfortran`
24+
const libgfortran_splitpath = ["lib", "libgfortran.so"]
25+
26+
# This will be filled out by __init__() for all products, as it must be done at runtime
27+
libgfortran_path = ""
28+
29+
# libgfortran-specific global declaration
30+
# This will be filled out by __init__()
31+
libgfortran_handle = C_NULL
32+
33+
# This must be `const` so that we can use it with `ccall()`
34+
const libgfortran = "libgfortran.so.5"
35+
36+
37+
# Relative path to `libstdcxx`
38+
const libstdcxx_splitpath = ["lib", "libstdc++.so"]
39+
40+
# This will be filled out by __init__() for all products, as it must be done at runtime
41+
libstdcxx_path = ""
42+
43+
# libstdcxx-specific global declaration
44+
# This will be filled out by __init__()
45+
libstdcxx_handle = C_NULL
46+
47+
# This must be `const` so that we can use it with `ccall()`
48+
const libstdcxx = "libstdc++.so.6"
49+
50+
51+
"""
52+
Open all libraries
53+
"""
54+
function __init__()
55+
global prefix = abspath(joinpath(@__DIR__, ".."))
56+
57+
# Initialize PATH and LIBPATH environment variable listings
58+
global PATH_list, LIBPATH_list
59+
global libgcc_s_path = abspath(joinpath(artifact"CompilerSupportLibraries", libgcc_s_splitpath...))
60+
61+
# Manually `dlopen()` this right now so that future invocations
62+
# of `ccall` with its `SONAME` will find this path immediately.
63+
global libgcc_s_handle = dlopen(libgcc_s_path)
64+
push!(LIBPATH_list, dirname(libgcc_s_path))
65+
66+
global libgfortran_path = abspath(joinpath(artifact"CompilerSupportLibraries", libgfortran_splitpath...))
67+
68+
# Manually `dlopen()` this right now so that future invocations
69+
# of `ccall` with its `SONAME` will find this path immediately.
70+
global libgfortran_handle = dlopen(libgfortran_path)
71+
push!(LIBPATH_list, dirname(libgfortran_path))
72+
73+
global libstdcxx_path = abspath(joinpath(artifact"CompilerSupportLibraries", libstdcxx_splitpath...))
74+
75+
# Manually `dlopen()` this right now so that future invocations
76+
# of `ccall` with its `SONAME` will find this path immediately.
77+
global libstdcxx_handle = dlopen(libstdcxx_path)
78+
push!(LIBPATH_list, dirname(libstdcxx_path))
79+
80+
# Filter out duplicate and empty entries in our PATH and LIBPATH entries
81+
filter!(!isempty, unique!(PATH_list))
82+
filter!(!isempty, unique!(LIBPATH_list))
83+
global PATH = join(PATH_list, ':')
84+
global LIBPATH = join(LIBPATH_list, ':')
85+
86+
# Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms
87+
# that don't honor our "already opened" trick)
88+
#for lp in LIBPATH_list
89+
# push!(DL_LOAD_PATH, lp)
90+
#end
91+
end # __init__()
92+

0 commit comments

Comments
 (0)