File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2947,8 +2947,13 @@ function target.linkname(filename, opt)
2947
2947
if count > 0 and linkname then
2948
2948
return linkname
2949
2949
end
2950
- -- for custom shared libraries name, xxx.so, xxx.dylib
2951
- if not filename :startswith (" lib" ) and (filename :endswith (" .so" ) or filename :endswith (" .dylib" )) then
2950
+ -- fallback to the generic unix library name, libxxx.a, libxxx.so, ..
2951
+ if filename :startswith (" lib" ) then
2952
+ if filename :endswith (" .a" ) or filename :endswith (" .so" ) then
2953
+ return path .basename (filename :sub (4 ))
2954
+ end
2955
+ elseif filename :endswith (" .so" ) or filename :endswith (" .dylib" ) then
2956
+ -- for custom shared libraries name, xxx.so, xxx.dylib
2952
2957
return filename
2953
2958
end
2954
2959
return nil
You can’t perform that action at this time.
0 commit comments