diff options
author | Lars Kanis <lars@greiz-reinsdorf.de> | 2019-12-27 01:12:30 +0100 |
---|---|---|
committer | Sutou Kouhei <kou@clear-code.com> | 2019-12-27 09:12:30 +0900 |
commit | 20795323f932e863b30a145f84a92466f1aba361 (patch) | |
tree | dfa121be21c4a1cfab1eaaedfe63f1ba4f8a006f | |
parent | ad5ff46e1fa14dc6f4f27b7cfb855902dddd1c5b (diff) | |
download | rake-compiler-20795323f932e863b30a145f84a92466f1aba361.tar.gz |
Strip cross built shared library files while linking (#165)
The .so files of extensions are often manually stripped after compilation per task in a Rakefile.
This is done to reduce gem size and because debug information in release binaries isn't particular useful.
This manual step can be avoided, if the cross ruby version is built with stripping enabled.
Compatibility is ensured, since stripping files a second time doesn't make a difference.
-rw-r--r-- | tasks/bin/cross-ruby.rake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tasks/bin/cross-ruby.rake b/tasks/bin/cross-ruby.rake index c9b0bbb..278541c 100644 --- a/tasks/bin/cross-ruby.rake +++ b/tasks/bin/cross-ruby.rake @@ -113,7 +113,8 @@ file "#{build_dir}/Makefile" => [build_dir, source_dir] do |t| "--build=#{RUBY_BUILD}", '--enable-shared', '--disable-install-doc', - '--with-ext=' + '--with-ext=', + 'LDFLAGS=-pipe -s', ] # Force Winsock2 for Ruby 1.8, 1.9 defaults to it |