summaryrefslogtreecommitdiffhomepage
path: root/tasks/mruby_build.rake
diff options
context:
space:
mode:
Diffstat (limited to 'tasks/mruby_build.rake')
-rw-r--r--tasks/mruby_build.rake11
1 files changed, 10 insertions, 1 deletions
diff --git a/tasks/mruby_build.rake b/tasks/mruby_build.rake
index e1aae502a..c92400cf9 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
@@ -98,7 +103,7 @@ module MRuby
end
def mrbcfile
- MRuby.targets['host'].exefile("#{MRuby.targets['host'].build_dir}/bin/mrbc")
+ MRuby.targets[@name].exefile("#{MRuby.targets[@name].build_dir}/bin/mrbc")
end
def compilers
@@ -204,6 +209,10 @@ module MRuby
super
end
+ def mrbcfile
+ MRuby.targets['host'].exefile("#{MRuby.targets['host'].build_dir}/bin/mrbc")
+ end
+
def run_test
mrbtest = exefile("#{build_dir}/test/mrbtest")
if (@test_runner.command == nil)