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

This commit is contained in:
take_cheeze
2013-11-24 20:38:47 +09:00
parent a2e0c6ea3a
commit f07ba44c69
2 changed files with 15 additions and 1 deletions
+5
View File
@@ -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
+10 -1
View File
@@ -1,7 +1,16 @@
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