diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -9,6 +9,7 @@ char *base_file; StringArray include_paths; bool opt_fcommon = false; bool opt_fpic; +bool opt_line_numbers; static FILE *open_file(char *path) { if (!path || strcmp(path, "-") == 0) @@ -64,8 +65,14 @@ static void cc1(char *base_file) { } int main(int argc, char **argv) { - assert(argc == 2); - base_file = argv[1]; - cc1(argv[1]); + for (int i = 1; i < argc; i++) { + if (!strcmp(argv[i], "--line-numbers")) { + opt_line_numbers = 1; + } else { + assert(!base_file); + base_file = argv[1]; + } + } + cc1(base_file); return 0; } |