Skip to content

Commit

Permalink
Add -main option to dmd-script
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed Sep 28, 2020
1 parent 1a4bcb2 commit 1f5162f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dmd-script
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ Usage:
-Llinkerflag pass linkerflag to link
-lib generate library rather than object files
-m... pass an -m... option to gdc
-main add default main() (e.g. for unittesting)
-man open web browser on manual page
-map generate linker .map file
-noboundscheck turns off array bounds checking for all functions
Expand Down Expand Up @@ -467,6 +468,8 @@ while ( $arg_i < scalar(@ARGV) ) {
} elsif ( $arg =~ m/^-f.+/ ) {
# Pass -fxxx options
push @out, $arg;
} elsif ($arg eq '-main') {
push @out, '-fmain';
} elsif ($arg eq '-man') {
browse("http://www.gdcproject.org/wiki/UserDocumentation");
exit 0;
Expand Down

0 comments on commit 1f5162f

Please sign in to comment.