diff options
| author | KOBAYASHI Shuji <[email protected]> | 2021-02-14 11:55:53 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2021-02-14 11:55:53 +0900 |
| commit | a6a76d8fd2d7bb89c6034302bb416beb50ef5346 (patch) | |
| tree | eff2694cd146350690d1c47b6ac7f101f42af32b /mrbgems/mruby-bin-mrbc | |
| parent | c3ec5861ac4a94c78d6c0c3c510bc2b0451f5a7f (diff) | |
| download | mruby-a6a76d8fd2d7bb89c6034302bb416beb50ef5346.tar.gz mruby-a6a76d8fd2d7bb89c6034302bb416beb50ef5346.zip | |
Add `-s` option to `mrbc` for make variable static
Diffstat (limited to 'mrbgems/mruby-bin-mrbc')
| -rw-r--r-- | mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c b/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c index 31a4e6fa1..e17f32a2e 100644 --- a/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +++ b/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c @@ -14,17 +14,17 @@ #define C_EXT ".c" struct mrbc_args { - int argc; - char **argv; - int idx; const char *prog; const char *outfile; const char *initname; + char **argv; + int argc; + int idx; mrb_bool dump_struct : 1; mrb_bool check_syntax : 1; mrb_bool verbose : 1; mrb_bool remove_lv : 1; - unsigned int flags : 4; + uint8_t flags : 4; }; static void @@ -38,6 +38,7 @@ usage(const char *name) "-g produce debugging information", "-B<symbol> binary <symbol> output in C language format", "-S dump C struct (requires -B)", + "-s define <symbol> as static variable", "--remove-lv remove local variables", "--verbose run at verbose mode", "--version print the version", @@ -131,7 +132,10 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct mrbc_args *args) args->verbose = TRUE; break; case 'g': - args->flags |= DUMP_DEBUG_INFO; + args->flags |= MRB_DUMP_DEBUG_INFO; + break; + case 's': + args->flags |= MRB_DUMP_STATIC; break; case 'E': case 'e': |
