mirror of
https://github.com/reactos/ccache.git
synced 2024-10-07 17:13:20 +00:00
better -M tests
This commit is contained in:
parent
d53d4da65e
commit
ce3a6b06f4
16
ccache.c
16
ccache.c
@ -507,6 +507,22 @@ static void process_args(int argc, char **argv)
|
||||
failed();
|
||||
}
|
||||
|
||||
/* cope with -MD, -MM, -MMD before the code below chucks them */
|
||||
if (strcmp(argv[i], "-MD") == 0 ||
|
||||
strcmp(argv[i], "-MM") == 0 ||
|
||||
strcmp(argv[i], "-MMD") == 0) {
|
||||
args_add(stripped_args, argv[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* check for bad options */
|
||||
if (strncmp(argv[i], "-M", 2) == 0) {
|
||||
cc_log("argument %s is unsupported\n", argv[i]);
|
||||
stats_update(STATS_UNSUPPORTED);
|
||||
failed();
|
||||
continue;
|
||||
}
|
||||
|
||||
/* we must have -c */
|
||||
if (strcmp(argv[i], "-c") == 0) {
|
||||
args_add(stripped_args, argv[i]);
|
||||
|
1
ccache.h
1
ccache.h
@ -49,6 +49,7 @@ enum stats {
|
||||
STATS_NOINPUT,
|
||||
STATS_MULTIPLE,
|
||||
STATS_CONFTEST,
|
||||
STATS_UNSUPPORTED,
|
||||
|
||||
STATS_END
|
||||
};
|
||||
|
1
stats.c
1
stats.c
@ -51,6 +51,7 @@ static struct {
|
||||
{ STATS_ARGS, "bad compiler arguments ", NULL, 0 },
|
||||
{ STATS_NOTC, "not a C/C++ file ", NULL, 0 },
|
||||
{ STATS_CONFTEST, "autoconf compile/link ", NULL, 0 },
|
||||
{ STATS_UNSUPPORTED, "unsupported compiler option ", NULL, 0 },
|
||||
{ STATS_DEVICE, "output to a non-regular file ", NULL, 0 },
|
||||
{ STATS_NOINPUT, "no input file ", NULL, 0 },
|
||||
{ STATS_NUMFILES, "files in cache ", NULL, FLAG_NOZERO|FLAG_ALWAYS },
|
||||
|
Loading…
Reference in New Issue
Block a user