aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/ext/grpc/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'src/ruby/ext/grpc/extconf.rb')
-rw-r--r--src/ruby/ext/grpc/extconf.rb23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb
index 3e01820a7b..9fad5b9904 100644
--- a/src/ruby/ext/grpc/extconf.rb
+++ b/src/ruby/ext/grpc/extconf.rb
@@ -116,16 +116,17 @@ create_makefile(output)
strip_tool = RbConfig::CONFIG['STRIP']
-File.open('Makefile.new', 'w') do |o|
- o.puts 'hijack: all strip'
- o.puts
- File.foreach('Makefile') do |i|
- o.puts i
+if grpc_config == 'opt'
+ File.open('Makefile.new', 'w') do |o|
+ o.puts 'hijack: all strip'
+ o.puts
+ File.foreach('Makefile') do |i|
+ o.puts i
+ end
+ o.puts
+ o.puts 'strip:'
+ o.puts "\t$(ECHO) Stripping $(DLLIB)"
+ o.puts "\t$(Q) #{strip_tool} $(DLLIB)"
end
- o.puts
- o.puts 'strip:'
- o.puts "\t$(ECHO) Stripping $(DLLIB)"
- o.puts "\t$(Q) #{strip_tool} $(DLLIB)"
+ File.rename('Makefile.new', 'Makefile')
end
-
-File.rename('Makefile.new', 'Makefile')