From: Anders F Björklund Date: Tue, 3 Jul 2018 16:54:34 +0000 (+0200) Subject: Add handling of separate -target parameter X-Git-Tag: v3.4.3~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42f125eb5215d3bcc2b0833a2e681670abcbf714;p=thirdparty%2Fccache.git Add handling of separate -target parameter Otherwise you will get an error in the log: "x86_64-pc-linux-gnu is not a regular file, not considering as input file" The argument seems to be specific to clang. --- diff --git a/src/ccache.c b/src/ccache.c index 848eecbb9..909a74191 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -2511,6 +2511,19 @@ cc_process_args(struct args *args, struct args **preprocessor_args, free(relpath); continue; } + // Alternate form of specifying target without = + if (str_eq(argv[i], "-target")) { + if (i == argc-1) { + cc_log("Missing argument to %s", argv[i]); + stats_update(STATS_ARGS); + result = false; + goto out; + } + args_add(stripped_args, argv[i]); + args_add(stripped_args, argv[i+1]); + i++; + continue; + } if (str_startswith(argv[i], "-Wp,")) { if (str_eq(argv[i], "-Wp,-P") || strstr(argv[i], ",-P,")