diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-06 19:50:03 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-01-06 19:50:03 +0900 |
| commit | 676054c8dff62517e8abca56949a355fd3141018 (patch) | |
| tree | c6afc05281a7a071dd22ac2626346cd549a7dce2 | |
| parent | 01aa2a990fdf22c25c95dd776f07779f5a06758d (diff) | |
| parent | 90283432a44bf018e3d334300e1e44866f4fa463 (diff) | |
| download | mruby-676054c8dff62517e8abca56949a355fd3141018.tar.gz mruby-676054c8dff62517e8abca56949a355fd3141018.zip | |
Merge pull request #5258 from shuujii/fix-build-with-enable_cxx_exception
Fix build with `enable_cxx_exception`
| -rw-r--r-- | mrbgems/mruby-compiler/mrbgem.rake | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mrbgems/mruby-compiler/mrbgem.rake b/mrbgems/mruby-compiler/mrbgem.rake index da910537a..3ecaa8908 100644 --- a/mrbgems/mruby-compiler/mrbgem.rake +++ b/mrbgems/mruby-compiler/mrbgem.rake @@ -3,15 +3,14 @@ MRuby::Gem::Specification.new 'mruby-compiler' do |spec| spec.author = 'mruby developers' spec.summary = 'mruby compiler library' - as_cxx_srcs = %w[codegen y.tab].map{|name| "#{dir}/core/#{name}.c"} - objs = Dir.glob("#{dir}/core/*.c").map do |src| - if build.cxx_exception_enabled? && as_cxx_srcs.include?(src) + objs = %w[codegen y.tab].map do |name| + src = "#{dir}/core/#{name}.c" + if build.cxx_exception_enabled? build.compile_as_cxx(src) else objfile(src.pathmap("#{build_dir}/core/%n")) end end - objs << objfile("#{build_dir}/core/y.tab") build.libmruby_core_objs << objs lex_def = "#{dir}/core/lex.def" |
