scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit fb01281f08252d887b251ae3542f92dbed61093e
parent f732da390b6dd2b9033090c9e739daa4cf6a4a5b
Author: Quentin Rameau <quinq@fifth.space>
Date:   Thu,  2 Jun 2016 19:40:44 +0200

[driver] add support for I flag

Diffstat:
Mdriver/posix/scc.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/driver/posix/scc.c b/driver/posix/scc.c @@ -144,7 +144,7 @@ settool(int tool, char *input, int output) switch (tool) { case CC1: - t->args[1] = input; + t->args[t->nargs + 1] = input; break; case AS: outfiles[output] = newfileext(input, "o"); @@ -277,7 +277,7 @@ build(char *file) static void usage(void) { - die("usage: %s [-E|-kS] [-m arch] input ...", argv0); + die("usage: %s [-E|-kS] [-m arch] [-I dir]... input ...", argv0); } int @@ -292,6 +292,10 @@ main(int argc, char *argv[]) Eflag = 1; ADDARG(CC1, "-E"); break; + case 'I': + ADDARG(CC1, "-I"); + ADDARG(CC1, EARGF(usage())); + break; case 'S': Sflag = 1; break;