mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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)
This commit is contained in:
+2
-2
@@ -4,11 +4,11 @@ MRuby.each_target do
|
||||
current_build_dir = "#{build_dir}/#{relative_from_root}"
|
||||
|
||||
objs = Dir.glob("#{current_dir}/*.c").map { |f|
|
||||
next nil if cxx_abi_enabled? and f =~ /(error|vm).c$/
|
||||
next nil if cxx_exception_enabled? and f =~ /(error|vm).c$/
|
||||
objfile(f.pathmap("#{current_build_dir}/%n"))
|
||||
}.compact
|
||||
|
||||
if cxx_abi_enabled?
|
||||
if cxx_exception_enabled?
|
||||
objs += %w(vm error).map { |v| compile_as_cxx "#{current_dir}/#{v}.c", "#{current_build_dir}/#{v}.cxx" }
|
||||
end
|
||||
self.libmruby << objs
|
||||
|
||||
Reference in New Issue
Block a user