diff options
author | Michael Forney <mforney@mforney.org> | 2019-02-13 12:09:13 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-02-13 12:09:13 -0800 |
commit | e22b4bd48c85de1c5f62a4ccbf178668b02f191d (patch) | |
tree | 640470b4d311dc41fb641697ca80d9aa8b5aade1 | |
parent | 7b800b29e048a2bb05c8d6d04442524677f2c061 (diff) | |
download | cproc-e22b4bd48c85de1c5f62a4ccbf178668b02f191d.tar.xz |
driver: Pass -idirafter to preprocessor
-rw-r--r-- | driver.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -328,12 +328,11 @@ main(int argc, char *argv[]) arrayaddptr(&phases[LINK].cmd, arg); } else if (strcmp(arg, "-emit-qbe") == 0) { last = COMPILE; - } else if (strcmp(arg, "-include") == 0) { - --argc, arg = *++argv; - if (!arg) + } else if (strcmp(arg, "-include") == 0 || strcmp(arg, "-idirafter") == 0) { + if (!--argc) usage(); - arrayaddptr(&phases[PREPROCESS].cmd, "-include"); arrayaddptr(&phases[PREPROCESS].cmd, arg); + arrayaddptr(&phases[PREPROCESS].cmd, *++argv); } else if (strcmp(arg, "-pipe") == 0) { /* ignore */ } else { |