[hackers] [scc] [driver] add S flag for stopping after assembly output || Quentin Rameau

From: <git_AT_suckless.org>
Date: Wed, 1 Jun 2016 19:45:53 +0200 (CEST)

commit 941eee05b2a817286159b9470c683cebd27f2345
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Wed Jun 1 19:44:34 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Wed Jun 1 19:44:34 2016 +0200

    [driver] add S flag for stopping after assembly output

diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index b237718..9d21684 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
_AT_@ -42,7 +42,7 @@ static struct tool {
 
 char *argv0;
 static char *arch;
-static int Eflag, kflag;
+static int Eflag, Sflag, kflag;
 
 static void
 terminate(void)
_AT_@ -159,13 +159,17 @@ build(char *file)
                         ADDARG(tool, file);
                         break;
                 case CC2:
- out = (!arch || strcmp(arch, "qbe")) ? AS : QBE;
- if (out != QBE)
- keepfile = kflag;
+ if (!arch || strcmp(arch, "qbe")) {
+ out = Sflag ? NR_TOOLS : AS;
+ keepfile = (Sflag || kflag);
+ } else {
+ out = QBE;
+ keepfile = Sflag;
+ }
                         break;
                 case QBE:
- out = AS;
- keepfile = kflag;
+ out = Sflag ? NR_TOOLS : AS;
+ keepfile = (Sflag || kflag);
                         break;
                 case AS:
                         out = NR_TOOLS;
_AT_@ -208,6 +212,9 @@ main(int argc, char *argv[])
                 Eflag = 1;
                 ADDARG(CC1, "-E");
                 break;
+ case 'S':
+ Sflag = 1;
+ break;
         case 'k':
                 kflag = 1;
                 break;
Received on Wed Jun 01 2016 - 19:45:53 CEST

This archive was generated by hypermail 2.3.0 : Wed Jun 01 2016 - 19:48:21 CEST