diff options
| author | KOBAYASHI Shuji <[email protected]> | 2021-01-27 20:47:10 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2021-01-27 20:47:10 +0900 |
| commit | 3104aed8c67754f14093ea73b2df4f995e4242d3 (patch) | |
| tree | 92370cd2eae6b40a1aaccd13559eb52cdafe04f9 /tasks | |
| parent | 251fd743151bb66cde3a3879d3b4b4b8c4ee7356 (diff) | |
| download | mruby-3104aed8c67754f14093ea73b2df4f995e4242d3.tar.gz mruby-3104aed8c67754f14093ea73b2df4f995e4242d3.zip | |
Split `presym_table` for reduced program size
Because a structure that is an element of `presym_table` has padding, split
it into individual arrays for name and length.
#### Result (64-bit CPU with full-core gembox)
| | mruby | libmruby.a |
|--------|------------|------------|
| Before | 1,087,444B | 1,476,872B |
| After | 1,079,340B | 1,469,784B |
Diffstat (limited to 'tasks')
| -rw-r--r-- | tasks/presym.rake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tasks/presym.rake b/tasks/presym.rake index 8b18acd75..2efc4d790 100644 --- a/tasks/presym.rake +++ b/tasks/presym.rake @@ -33,7 +33,11 @@ MRuby.each_target do |build| current_presyms = presym.read_list if File.exist?(presym.list_path) update = presyms != current_presyms presym.write_list(presyms) if update - presym.write_header(presyms) if update || !File.exist?(presym.header_path) + mkdir_p presym.header_dir + %w[id table].each do |type| + next if !update && File.exist?(presym.send("#{type}_header_path")) + presym.send("write_#{type}_header", presyms) + end end gensym_task.enhance([presym.list_path]) |
