summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Kanis <kanis@comcard.de>2015-08-05 18:07:40 +0200
committerLars Kanis <kanis@comcard.de>2015-08-05 18:07:40 +0200
commitd788dfa418eac8048a7a1a8a7386d253c7950d7d (patch)
treef7f727c7f41637584d4b07b43bdb5516720c0921
parentf3e0e2d6f2581b7a721fdc71ed0ab35f3ac4546e (diff)
downloadffi-d788dfa418eac8048a7a1a8a7386d253c7950d7d.tar.gz
Strip only so-files of fat binary gems, but not that of the native build.
-rw-r--r--Rakefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Rakefile b/Rakefile
index e671f91..10839e2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -177,13 +177,14 @@ if USE_RAKE_COMPILER
ENV['RUBY_CC_VERSION'] ||= '1.8.7:1.9.3:2.0.0:2.1.5:2.2.1'
+ # To reduce the gem file size strip mingw32 dlls before packaging
ENV['RUBY_CC_VERSION'].to_s.split(':').each do |ruby_version|
- task "copy:ffi_c:i386-mingw32:#{ruby_version}" do |t|
- sh "i686-w64-mingw32-strip -S #{BUILD_DIR}/i386-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
+ task "build/i386-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so" do |t|
+ sh "i686-w64-mingw32-strip -S build/i386-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
end
- task "copy:ffi_c:x64-mingw32:#{ruby_version}" do |t|
- sh "x86_64-w64-mingw32-strip -S #{BUILD_DIR}/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
+ task "build/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so" do |t|
+ sh "x86_64-w64-mingw32-strip -S build/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
end
end