Files
mruby-mruby/tasks/mrblib.rake
T
Yukihiro "Matz" Matsumoto bd4f380178 build system: remove dead presym_enabled? checks
Since presym is now always enabled, the @enable_presym flag,
presym_enabled? method, and all conditional branches guarding
presym-specific code paths are dead code. Remove them and
simplify the affected build logic.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-19 14:10:02 +09:00

30 lines
905 B
Ruby

MRuby.each_target do
next unless libmruby_enabled?
src = "#{build_dir}/mrblib/mrblib.c"
rbfiles = Dir["#{MRUBY_ROOT}/mrblib/*.rb"].sort!
self.libmruby_objs << objfile(src.ext)
file src => [mrbcfile, __FILE__, *rbfiles] do |t|
mkdir_p File.dirname(t.name)
File.open(t.name, 'w') do |f|
_pp "GEN", "mrblib/*.rb", "#{t.name.relative_path}"
f.puts %Q[/*]
f.puts %Q[ * This file is loading the mrblib]
f.puts %Q[ *]
f.puts %Q[ * IMPORTANT:]
f.puts %Q[ * This file was generated!]
f.puts %Q[ * All manual changes will get lost.]
f.puts %Q[ */]
mrbc.run f, rbfiles, "mrblib_proc", cdump: true, static: true
f.puts %Q[void]
f.puts %Q[mrb_init_mrblib(mrb_state *mrb)]
f.puts %Q[{]
f.puts %Q[ mrblib_proc_init_syms(mrb);]
f.puts %Q[ mrb_load_proc(mrb, mrblib_proc);]
f.puts %Q[}]
end
end
end