Commit f07ba44c authored by take_cheeze's avatar take_cheeze

add enable_debug method to MRuby::Build and build debug version in travis-ci

parent a2e0c6ea
......@@ -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