diff options
| author | take_cheeze <[email protected]> | 2014-02-25 18:47:28 +0900 |
|---|---|---|
| committer | take_cheeze <[email protected]> | 2014-03-01 20:05:29 +0900 |
| commit | 78915f96017a12e8c3c40a4a2714543c10d0d070 (patch) | |
| tree | 9db022c63ebd09aec5d1164141a0bdb85cc93d3f /tasks/mruby_build.rake | |
| parent | 5ff9c1d2861609fc98f03ec2d768e0b4f1559a09 (diff) | |
| download | mruby-78915f96017a12e8c3c40a4a2714543c10d0d070.tar.gz mruby-78915f96017a12e8c3c40a4a2714543c10d0d070.zip | |
support c++ exception
Diffstat (limited to 'tasks/mruby_build.rake')
| -rw-r--r-- | tasks/mruby_build.rake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tasks/mruby_build.rake b/tasks/mruby_build.rake index b7efa96b9..3c0a67179 100644 --- a/tasks/mruby_build.rake +++ b/tasks/mruby_build.rake @@ -81,6 +81,7 @@ module MRuby @bins = %w(mrbc) @gems, @libmruby = MRuby::Gem::List.new, [] @build_mrbtest_lib_only = false + @cxx_abi_enabled = false MRuby.targets[@name] = self end @@ -94,6 +95,16 @@ module MRuby @mrbc.compile_options += ' -g' end + def cxx_abi_enabled? + @cxx_abi_enabled + end + + def enable_cxx_abi + return if @cxx_abi_enabled + compilers.each { |c| c.defines += %w(MRB_ENABLE_CXX_EXCEPTION) } + @cxx_abi_enabled = true + end + def toolchain(name) tc = Toolchain.toolchains[name.to_s] fail "Unknown #{name} toolchain" unless tc |
