Skip to content

Commit 9d89594

Browse files
authored
improve filtering of libjulia libraries when bundling (#829)
1 parent 5e2a8fd commit 9d89594

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/PackageCompiler.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,8 +1173,18 @@ function bundle_julia_libraries(dest_dir, stdlibs)
11731173
end
11741174
end
11751175

1176-
matches = glob(glob_pattern_lib("libjulia"), lib_dir)
1176+
major, minor, patch = VERSION.major, VERSION.minor, VERSION.patch
1177+
r = if Sys.isapple()
1178+
Regex("^libjulia(\\.$major(\\.$minor(\\.$patch)?)?)?\\.dylib\$")
1179+
elseif Sys.islinux()
1180+
Regex("^libjulia\\.so(\\.$major(\\.$minor(\\.$patch)?)?)?\$")
1181+
elseif Sys.iswindows()
1182+
Regex("^libjulia\\.dll\$")
1183+
end
1184+
1185+
matches = filter(!isnothing, match.(r, readdir(lib_dir)))
11771186
for match in matches
1187+
match = joinpath(lib_dir, match.match)
11781188
dest = joinpath(app_lib_dir, basename(match))
11791189
isfile(dest) && continue
11801190
mark = "├──"

0 commit comments

Comments
 (0)