mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
73b4152574
Previously, `libmruby.a` was created even if only `mruby-bin-mrbc` or` mruby-compiler` was specified for gem, but by specifying `disable_libmruby`, the creation of `libmruby.a` can be suppressed. ### Note The https://github.com/mruby/mruby/pull/5084#issuecomment-723521971 incompatibility seems to be difficult for users to avoid, so the original behavior has been restored. Therefore, if we need `mrbc` other than the `host` build, we need to explicitly specify `mruby-bin-mrbc` gem. Due to the above changes, `build_config/boxing.rb` etc. will not work, but I have added` mruby-bin-mrbc` to `default.gembox` to fix it. I don't think this change is a big deal because originally `mruby-compiler` was included.
14 lines
374 B
Ruby
14 lines
374 B
Ruby
as_cxx_srcs = %w[vm error gc].map{|name| "#{MRUBY_ROOT}/src/#{name}.c"}
|
|
|
|
MRuby.each_target do
|
|
objs = Dir.glob("#{MRUBY_ROOT}/src/*.c").map do |src|
|
|
dst = src.pathmap("#{build_dir}/src/%n")
|
|
if cxx_exception_enabled? && as_cxx_srcs.include?(src)
|
|
compile_as_cxx(src, "#{dst}.cxx")
|
|
else
|
|
objfile(dst)
|
|
end
|
|
end
|
|
self.libmruby_core_objs << objs
|
|
end
|