summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-bin-mruby
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-03-02 10:58:26 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-03-02 10:58:26 +0900
commit0bcf9e28fc6b41f75e78557295decfdcdb947b7a (patch)
treef35fed4d182ee5dadeb91048a1bdba9da1d9063b /mrbgems/mruby-bin-mruby
parentfdd92750fe7e65150b067bc5179e813e7b5e2312 (diff)
downloadmruby-0bcf9e28fc6b41f75e78557295decfdcdb947b7a.tar.gz
mruby-0bcf9e28fc6b41f75e78557295decfdcdb947b7a.zip
Reorganize C++ exceptions; ref #3470
There are 3 levels of C++ exception handling: * default - no C++ exception (use setjmp/longjmp) * enable_cxx_exception (use C++ exceptions with C ABI) * enable_cxx_abi (use C++ ABI including exceptions)
Diffstat (limited to 'mrbgems/mruby-bin-mruby')
-rw-r--r--mrbgems/mruby-bin-mruby/mrbgem.rake6
1 files changed, 6 insertions, 0 deletions
diff --git a/mrbgems/mruby-bin-mruby/mrbgem.rake b/mrbgems/mruby-bin-mruby/mrbgem.rake
index ba7fad1fa..243b413eb 100644
--- a/mrbgems/mruby-bin-mruby/mrbgem.rake
+++ b/mrbgems/mruby-bin-mruby/mrbgem.rake
@@ -4,4 +4,10 @@ MRuby::Gem::Specification.new('mruby-bin-mruby') do |spec|
spec.summary = 'mruby command'
spec.bins = %w(mruby)
spec.add_dependency('mruby-compiler', :core => 'mruby-compiler')
+ spec.add_dependency('mruby-error', :core => 'mruby-error')
+
+ if build.cxx_exception_enabled?
+ @objs << build.compile_as_cxx("#{spec.dir}/tools/mruby/mruby.c", "#{spec.build_dir}/tools/mruby/mruby.cxx")
+ @objs.delete_if { |v| v == objfile("#{spec.build_dir}/tools/mruby/mruby") }
+ end
end