Commit 91a4eb57 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1595 from take-cheeze/filename_realloc_fix

get_filename_table_size realloc fix.
parents 28a159c7 23a41283
......@@ -492,6 +492,7 @@ get_filename_table_size(mrb_state *mrb, mrb_irep *irep, mrb_sym **fp, size_t *lp
}
for (i=0; i<irep->rlen; i++) {
size += get_filename_table_size(mrb, irep->reps[i], fp, lp);
filenames = *fp;
}
}
return size;
......
......@@ -87,6 +87,11 @@ module MRuby
MRuby.targets[@name].instance_eval(&block)
end
def enable_debug
compilers.each { |c| c.defines += %w(MRB_DEBUG) }
@mrbc.compile_options += ' -g'
end
def toolchain(name)
tc = Toolchain.toolchains[name.to_s]
fail "Unknown #{name} toolchain" unless tc
......
MRuby::Build.new('debug') do |conf|
toolchain :gcc
enable_debug
# include all core GEMs
conf.gembox 'full-core'
conf.cc.defines = %w(MRB_GC_FIXED_ARENA)
end
MRuby::Build.new do |conf|
toolchain :gcc
# include all core GEMs
conf.gembox 'full-core'
conf.cc.defines = %w(MRB_DEBUG MRB_GC_FIXED_ARENA)
conf.cc.defines = %w(MRB_GC_FIXED_ARENA)
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment