aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNadia Holmquist Pedersen <nadia@nhp.sh>2021-04-25 10:06:19 +0200
committerNadia Holmquist Pedersen <nadia@nhp.sh>2021-04-25 10:06:19 +0200
commit00e4df74212f78faf415020323731e60f7bda6f3 (patch)
treed018be0f3ddba879d3e3912943c5f08584aff184 /tools
parenta860c5fbd3074027ddd40492736f3f7c3cb02480 (diff)
Strip Mac libraries
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mac-libs.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/mac-libs.rb b/tools/mac-libs.rb
index d8ddcab..0c1920f 100755
--- a/tools/mac-libs.rb
+++ b/tools/mac-libs.rb
@@ -92,10 +92,15 @@ def install_name_tool(exec, action, path1, path2 = nil)
end
end
+def strip(lib)
+ `strip -SNTx "#{lib}"`
+end
+
def fixup_libs(prog, orig_path)
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] }
+ strip prog
libs.each do |lib|
libpath, libtype = lib