Merge pull request #5102 from dearblue/c++-exc

Fixed build with `conf.enable_cxx_exception`
This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-10-29 10:41:56 +09:00
committed by GitHub
3 changed files with 3 additions and 4 deletions
-1
View File
@@ -18,7 +18,6 @@
#include <mruby/dump.h>
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/throw.h>
#include <stdlib.h>
#include <string.h>
+1 -1
View File
@@ -5,7 +5,7 @@ MRuby::Gem::Specification.new 'mruby-compiler' do |spec|
lex_def = "#{dir}/core/lex.def"
core_objs = Dir.glob("#{dir}/core/*.c").map { |f|
next nil if build.cxx_exception_enabled? and f =~ /(codegen).c$/
next nil if build.cxx_exception_enabled? and f =~ /(codegen|y\.tab)\.c$/
objfile(f.pathmap("#{build_dir}/core/%n"))
}.compact
+2 -2
View File
@@ -4,12 +4,12 @@ MRuby.each_target do
current_build_dir = "#{build_dir}/#{relative_from_root}"
objs = Dir.glob("#{current_dir}/*.c").map { |f|
next nil if cxx_exception_enabled? and f =~ /(error|vm).c$/
next nil if cxx_exception_enabled? and f =~ /(error|vm|gc)\.c$/
objfile(f.pathmap("#{current_build_dir}/%n"))
}.compact
if cxx_exception_enabled?
objs += %w(vm error).map { |v| compile_as_cxx "#{current_dir}/#{v}.c", "#{current_build_dir}/#{v}.cxx" }
objs += %w(vm error gc).map { |v| compile_as_cxx "#{current_dir}/#{v}.c", "#{current_build_dir}/#{v}.cxx" }
end
self.libmruby_objs << objs