Strip Mac libraries

This commit is contained in:
Nadia Holmquist Pedersen 2021-04-25 10:06:19 +02:00
parent a860c5fbd3
commit 00e4df7421
1 changed files with 5 additions and 0 deletions

View File

@ -92,10 +92,15 @@ def install_name_tool(exec, action, path1, path2 = nil)
end end
end end
def strip(lib)
`strip -SNTx "#{lib}"`
end
def fixup_libs(prog, orig_path) def fixup_libs(prog, orig_path)
throw "fixup_libs: #{prog} doesn't exist" unless File.exist? prog throw "fixup_libs: #{prog} doesn't exist" unless File.exist? prog
libs = get_load_libs(prog).map { |it| expand_load_path(orig_path, it) }.select { |it| not system_lib? it[0] } libs = get_load_libs(prog).map { |it| expand_load_path(orig_path, it) }.select { |it| not system_lib? it[0] }
strip prog
libs.each do |lib| libs.each do |lib|
libpath, libtype = lib libpath, libtype = lib