summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-bin-strip
AgeCommit message (Collapse)Author
2020-11-21Rename `MRB_{ENABLE,DISABLE}_` to `MRB_{USE,NO}_`; close #5163KOBAYASHI Shuji
| Previous Name | New Name | |------------------------------|-------------------------| | MRB_ENABLE_ALL_SYMBOLS | MRB_USE_ALL_SYMBOLS | | MRB_ENABLE_SYMBOLL_ALL | MRB_USE_ALL_SYMBOLS | | MRB_ENABLE_CXX_ABI | MRB_USE_CXX_ABI | | MRB_ENABLE_CXX_EXCEPTION | MRB_USE_CXX_EXCEPTION | | MRB_ENABLE_DEBUG_HOOK | MRB_USE_DEBUG_HOOK | | MRB_DISABLE_DIRECT_THREADING | MRB_NO_DIRECT_THREADING | | MRB_DISABLE_STDIO | MRB_NO_STDIO | | ENABLE_LINENOISE | MRB_USE_LINENOISE | | ENABLE_READLINE | MRB_USE_READLINE | | DISABLE_MIRB_UNDERSCORE | MRB_NO_MIRB_UNDERSCORE | | DISABLE_GEMS | MRB_NO_GEMS | * `MRB_ENABLE_SYMBOLL_ALL` seems to be a typo, so it is fixed. * `MRB_` prefix is added to those without. * The previous names can also be used for compatibility.
2020-11-21Allow to mixed and specify `*.rb` and `*.mrb` in `bin/mruby`dearblue
It is not decides by the extension. In order to be recognized as a `.mrb` file, the following three points must be satisfied: - File starts with "RITE" - At least `sizeof(struct rite_binary_header)` bytes can be read - `NUL` is included in the first 64 bytes of the file If these are not met, it is judged as a text file and it is processed as a Ruby script. The `bin/mruby -b` switch is still available which treats the given file as a `.mrb` file. New `MRB_API` function: - `include/mruby/compile.h` and `mrbgems/mruby-compiler/core/parse.y` - `mrb_load_detect_file_cxt()` (remove with `MRB_DISABLE_STDIO`) NOTE: - Even script files now always open in binary mode for `bin/mruby`. The `\r\n` is handled by the `nextc()` function already, so there is no problem even on Windows. - The `nextc0()` function in `mrbgems/mruby-compiler/core/parse.y` can now specify a string buffer and a file pointer at the same time. In this case, get it from the string buffer first. This patch includes modifies by comment of https://github.com/mruby/mruby/pull/5157.
2020-10-29Move `build_config.rb` -> `build_config/default.rb`; ref #5098Yukihiro "Matz" Matsumoto
In addition, update the documents referring `build_config.rb` which is no longer used. The new `build_config.rb` describes the new configuration structure in the comment.
2020-03-08Add configuration guard for `MRB_DISABLE_STDIO`dearblue
ref #4576 and ref #4947 * Need MRBAPI functions without `MRB_DISABLE_STDIO`: * mrbgems/mruby-bin-debugger * mrbgems/mruby-bin-mirb * mrbgems/mruby-bin-mrbc * mrbgems/mruby-bin-mruby * mrbgems/mruby-bin-strip * Need `stdio.h`: * mrbgems/mruby-io * mrbgems/mruby-print * Need `snprintf()` in `stdio.h`: * mrbgems/mruby-pack * mrbgems/mruby-sprintf
2020-03-08Remove unnecessary 'stdio.h'; ref #4947dearblue
'stdio.h' is included in 'mruby.h' ('mrbconf.h'). However, keep 'stdio.h' used by mruby-test.
2018-08-30Separate meta-programming features to `mruby-metaprog` gem.Yukihiro "Matz" Matsumoto
We assume meta-programming is less used in embedded environments. We have moved following methods: * Kernel module global_variables, local_variables, singleton_class, instance_variables, instance_variables_defined?, instance_variable_get, instance_variable_set, methods, private_methods, public_methods, protected_methods, singleton_methods, define_singleton_methods * Module class class_variables, class_variables_defined?, class_variable_get, class_variable_set, remove_class_variable, included_modules, instance_methods, remove_method, method_removed, constants * Module class methods constants, nesting Note: Following meta-programming methods are kept in the core: * Module class alias_method, undef_method, ancestors, const_defined?, const_get, const_set, remove_const, method_defined?, define_method * Toplevel object define_method `mruby-metaprog` gem is linked by default (specified in default.gembox). When it is removed, it will save 40KB (stripped:8KB) on x86-64 environment last time I measured.
2018-07-10add mrbc option `--remove-lv`yuri
* refactor: move `irep_remove_lv` from `mruby-bin-strip` gem to src/dump and rename to `mrb_irep_remove_lv` * add: mrbc option `--remove-lv` to remove LVAR section
2017-08-12Reduce integer type mismatch warnings in VC.Yukihiro "Matz" Matsumoto
2015-11-27include changed from by quotes ("") to by brackets (<>); close #3032Yukihiro "Matz" Matsumoto
2015-09-30fix tests on windows.Yasuhiro Matsumoto
'bin/mruby' not work on windows. so correct command name and quoted arguments.
2014-12-11fix usage messagemurase_syuka
2014-08-04mruby-strip doesn't need mrbgemscremno
Reduces executable size by more than 50% (409->171 KB).
2014-07-12initialize `args` in `parse_args`cremno
2014-07-12coding style adjustmentscremno
2014-07-12update expected error message in bintestcremno
2014-07-12rewrite strippingcremno
Previous version ignored some errors, and didn't free memory and close files. Now no memory will be dynamically allocated to simplify error handling. This commit also fixes a wrong check: files[i] = fopen(argv[i], "wb"); if (!ireps[i]) { Improve error messages a bit and add missing newline to one.
2014-07-12check `mrb_open` return valuecremno
2014-05-19Move `Kernel.local_variables` to core.take_cheeze
2014-05-15move mrb_irep_remove_lv from etc.c to mruby-bin-strip gemYukihiro "Matz" Matsumoto
2014-05-15Implement `LVAR` section removing option in mruby-strip.take_cheeze
2014-03-17add summary to mrbgems without ittake_cheeze
2014-03-03add test to check striped binary works correctlytake_cheeze
2014-02-28add mruby-strip tool to strip irep's debug infotake_cheeze