summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-10-14 15:52:14 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-14 15:52:14 +0900
commit5b40bb8d159c1432bb87973b2b5f42473dd0c623 (patch)
tree7d845bda931b2842c21ed5e6113243d067103fc4 /lib
parent82046ff26ec9ae93d6d0cb5132a1dfd9651b5c3f (diff)
downloadmruby-5b40bb8d159c1432bb87973b2b5f42473dd0c623.tar.gz
mruby-5b40bb8d159c1432bb87973b2b5f42473dd0c623.zip
Avoid using C struct dump for test Ruby code.
Files under `test/t` and `mrbgem/*/test` are for tests, not for actual execution. So symbols in those files need not to be pre-allocated. This change slightly reduce the memory consumption.
Diffstat (limited to 'lib')
-rw-r--r--lib/mruby/build/command.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mruby/build/command.rb b/lib/mruby/build/command.rb
index 39981cc32..3d47c304f 100644
--- a/lib/mruby/build/command.rb
+++ b/lib/mruby/build/command.rb
@@ -310,16 +310,16 @@ module MRuby
def initialize(build)
super
@command = nil
- @compile_options = "-S -B%{funcname} -o-"
+ @compile_options = "-B%{funcname} -o-"
end
- def run(out, infiles, funcname)
+ def run(out, infiles, funcname, cdump = true)
@command ||= @build.mrbcfile
infiles = [infiles].flatten
infiles.each do |f|
_pp "MRBC", f.relative_path, nil, :indent => 2
end
- cmd = %Q["#{filename @command}" #{@compile_options % {:funcname => funcname}} #{filename(infiles).map{|f| %Q["#{f}"]}.join(' ')}]
+ cmd = %Q["#{filename @command}" #{cdump ? "-S" : ""} #{@compile_options % {:funcname => funcname}} #{filename(infiles).map{|f| %Q["#{f}"]}.join(' ')}]
puts cmd if Rake.verbose
IO.popen(cmd, 'r+') do |io|
out.puts io.read