Skip to content

Commit

Permalink
Handle "-O" as "-O2"
Browse files Browse the repository at this point in the history
  • Loading branch information
tyfkda committed Nov 14, 2024
1 parent d862f44 commit 1baf538
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cc/cc1.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ int main(int argc, char *argv[]) {
return 0;

case 'O':
{
if (optarg == NULL) {
cc_flags.optimize_level = 2;
} else {
char c = optarg[0];
switch (c) {
case '0':
Expand Down

0 comments on commit 1baf538

Please sign in to comment.