Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Jun 8, 2023
1 parent 94501fc commit 1fedc58
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
33 changes: 17 additions & 16 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ function bundle_julia_libraries(dest_dir, stdlibs)
dest = joinpath(app_libjulia_dir, basename(match))
isfile(dest) && continue
mark = "├──"
cp(match, dest)
cp(match, dest; force=true)
libsize = lstat(match).size
tot_libsize += libsize
if libsize > 1024
Expand All @@ -1162,8 +1162,10 @@ function bundle_julia_libraries(dest_dir, stdlibs)

matches = glob(glob_pattern_lib("libjulia"), lib_dir)
for match in matches
dest = joinpath(app_lib_dir, basename(match))
isfile(dest) && continue
mark = "├──"
cp(match, joinpath(app_lib_dir, basename(match)))
cp(match, dest)
libsize = lstat(match).size
tot_libsize += libsize
if libsize > 1024
Expand All @@ -1181,22 +1183,21 @@ function bundle_julia_libraries(dest_dir, stdlibs)
matches = glob(lib, libjulia_dir)
for match in matches
destpath = joinpath(app_libjulia_dir, basename(match))
if !isfile(destpath)
if !printed_stdlib && !isempty(match)
mark = "├──"
printed_stdlib = true
println("$mark ", stdlib)
end

libsize = lstat(match).size
isfile(destpath) && continue
if !printed_stdlib && !isempty(match)
mark = "├──"
if libsize > 1024
println(" │ │ $mark ", basename(match), " - ", pretty_byte_str(libsize))
first_lib = false
end
cp(match, destpath)
tot_libsize += libsize
printed_stdlib = true
println("$mark ", stdlib)
end

libsize = lstat(match).size
mark = "├──"
if libsize > 1024
println(" │ │ $mark ", basename(match), " - ", pretty_byte_str(libsize))
first_lib = false
end
cp(match, destpath)
tot_libsize += libsize
end
end
end
Expand Down
7 changes: 6 additions & 1 deletion src/library_selection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ const jll_mapping = Dict(
const required_libraries = Dict(
"windows" => ["libLLVM", "libatomic", "libdSFMT", "libgcc_s_seh", "libgfortran", "libgmp", "libgmpxx", "libgomp", "libjulia-codegen", "libjulia-internal", "libmpfr", "libopenlibm", "libpcre2", "libpcre2-16", "libpcre2-32", "libpcre2-8", "libpcre2-posix", "libquadmath", "libssp", "libstdc++", "libuv", "libwinpthread", "libz"],
"linux" => ["libLLVM", "libatomic", "libdSFMT", "libgcc_s", "libgfortran", "libgmp", "libgmpxx", "libgomp", "libjulia-codegen", "libjulia-internal", "libmpfr", "libopenlibm", "libpcre2-8", "libquadmath", "libssp", "libstdc++", "libunwind", "libuv", "libz"],
"mac" => ["libLLVM", "libatomic", "libdSFMT", "libgcc_s", "libgfortran", "libgmp", "libgmpxx", "libgomp", "libjulia-codegen", "libjulia-internal", "libmpfr", "libopenlibm", "libpcre2-8", "libquadmath", "libssp", "libstdc++", "libunwind", "libuv", "libz"]
"mac" => ["libLLVM", "libatomic", "libdSFMT", "libgcc_s", "libgfortran", "libgmp", "libgmpxx", "libgomp", "libjulia-codegen", "libjulia-internal", "libmpfr", "libopenlibm", "libpcre2-8", "libquadmath", "libssp", "libstdc++", "libuv", "libz"]
)
push!(required_libraries["windows"], "libgcc_s_jlj")
if Sys.VERSION < v"1.7.0"
push!(required_libraries["mac"], "libosxunwind")
else
push!(required_libraries["mac"], "libunwind")
end

0 comments on commit 1fedc58

Please sign in to comment.