summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortake_cheeze <[email protected]>2013-11-24 20:38:47 +0900
committertake_cheeze <[email protected]>2013-11-24 20:38:47 +0900
commitf07ba44c696f29cb73ba26a4595c44a63d6e18a5 (patch)
treeb57717d449b127a9b1df87b7d267ec12268c1fb6
parenta2e0c6ea3a104510ad3a5ecc0ee0f96297f6a550 (diff)
downloadmruby-f07ba44c696f29cb73ba26a4595c44a63d6e18a5.tar.gz
mruby-f07ba44c696f29cb73ba26a4595c44a63d6e18a5.zip
add enable_debug method to MRuby::Build and build debug version in travis-ci
-rw-r--r--tasks/mruby_build.rake5
-rw-r--r--travis_config.rb11
2 files changed, 15 insertions, 1 deletions
diff --git a/tasks/mruby_build.rake b/tasks/mruby_build.rake
index ff6110884..acaabfa81 100644
--- a/tasks/mruby_build.rake
+++ b/tasks/mruby_build.rake
@@ -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
diff --git a/travis_config.rb b/travis_config.rb
index 89aef9f55..360cf3337 100644
--- a/travis_config.rb
+++ b/travis_config.rb
@@ -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