summaryrefslogtreecommitdiff
path: root/6
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-04-08 01:17:34 -0700
committerOri Bernstein <ori@eigenstate.org>2018-04-08 01:17:34 -0700
commitc80d62a29435e75e476a93f0d7da3deb20e1204a (patch)
tree821f070f49620700c376360351708eaebadfd366 /6
parentf9f93d1e447873ca3e5fa6c542eb34e8dd8d4b71 (diff)
downloadmc-c80d62a29435e75e476a93f0d7da3deb20e1204a.tar.gz
Add support for `-T` option to compile in test mode.
Tests can now access hidden declarations.
Diffstat (limited to '6')
-rw-r--r--6/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/6/main.c b/6/main.c
index a153b8b..b770222 100644
--- a/6/main.c
+++ b/6/main.c
@@ -41,6 +41,7 @@ usage(char *prog)
printf("\t-o\tOutput to outfile\n");
printf("\t-O dir\tOutput to dir\n");
printf("\t-S\tGenerate assembly source alongside object code\n");
+ printf("\t-T\tCompile in test mode\n");
printf("\t-c\tEnable additional (possibly flaky) checking\n");
printf("\t-I path\tAdd 'path' to use search path\n");
printf("\t-d\tPrint debug dumps. Recognized options: f r p i\n");
@@ -200,7 +201,7 @@ main(int argc, char **argv)
outfile = NULL;
- optinit(&ctx, "cd:?hSo:I:9G:O:", argv, argc);
+ optinit(&ctx, "cd:?hSo:I:9G:O:T", argv, argc);
asmsyntax = Defaultasm;
sizefn = size;
while (!optdone(&ctx)) {
@@ -240,6 +241,9 @@ main(int argc, char **argv)
case 'I':
lappend(&incpaths, &nincpaths, ctx.optarg);
break;
+ case 'T':
+ allowhidden++;
+ break;
default:
usage(argv[0]);
exit(0);