-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
/
cache_stdlibs.jl
49 lines (40 loc) · 996 Bytes
/
cache_stdlibs.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Stdlibs sorted in dependency, then alphabetical, order by contrib/print_sorted_stdlibs.jl
# Run with the `--exclude-sysimage` option to filter out all packages included in the system image
stdlibs = [
# No dependencies
# 1-depth packages
:GMP_jll,
:LLVMLibUnwind_jll,
:LibUV_jll,
:LibUnwind_jll,
:MbedTLS_jll,
:OpenLibm_jll,
:PCRE2_jll,
:Zlib_jll,
:dSFMT_jll,
:libLLVM_jll,
# 2-depth packages
:LibSSH2_jll,
:MPFR_jll,
# 3-depth packages
:LibGit2_jll,
# 7-depth packages
:LLD_jll,
:SuiteSparse_jll,
# 9-depth packages
:Statistics,
:SuiteSparse,
]
depot = abspath(Sys.BINDIR, "..", "share", "julia")
if haskey(ENV, "JULIA_CPU_TARGET")
target = ENV["JULIA_CPU_TARGET"]
else
target = "native"
end
@info "Caching stdlibrary to" depot target
empty!(Base.DEPOT_PATH)
push!(Base.DEPOT_PATH, depot)
for pkg in stdlibs
pkgid = Base.identify_package(string(pkg))
Base.compilecache(pkgid)
end