mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #5102 from dearblue/c++-exc
Fixed build with `conf.enable_cxx_exception`
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user