We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bca7651 commit 862513bCopy full SHA for 862513b
lib/easy_compile/compilation_tasks.rb
@@ -113,6 +113,17 @@ def disable_shared
113
114
File.write(task.name, makefile_content)
115
end
116
+
117
+ makefile_content.match(/^ldflags\W+=(.*)/) do |match|
118
+ ldflags = match[1].split(" ")
119
+ next if ldflags.include?("-s")
120
121
+ ldflags << "-s"
122
123
+ makefile_content.gsub!(/^(ldflags\W+=)(.*)/, "\\1#{ldflags.join(' ')}")
124
125
+ File.write(task.name, makefile_content)
126
+ end
127
128
129
test/fixtures/dummy_gem/ext/hello_world/extconf.rb
@@ -2,6 +2,4 @@
2
3
require "mkmf"
4
5
-$LDFLAGS << " -s -pipe" if RUBY_PLATFORM !~ /darwin/
6
-
7
create_makefile("hello_world")
0 commit comments