Unverified Commit 78d185ef authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

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

Fixed build with `conf.enable_cxx_exception`
parents f2465881 336f0de8
......@@ -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>
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment