diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2018-08-18 22:28:24 +0200 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2018-08-18 22:28:24 +0200 |
commit | ebea06d8c4c5f157a10d60f8be459722c1a1d265 (patch) | |
tree | 781075678b664fc900670ed07bbf73d6c2fa3e98 | |
parent | 90203a0f53c34bdf9c277fdf19a92ea0b31fc39f (diff) | |
parent | 14fcb7a13db88b14d237473e6b9cd6ca7a59f2c1 (diff) | |
download | ccache-ebea06d8c4c5f157a10d60f8be459722c1a1d265.tar.gz |
Merge branch '3.4-maint'
* 3.4-maint:
Update NEWS
Add handling of separate -target parameter
Bail out on too hard clang option “-MJ”
-rw-r--r-- | doc/NEWS.adoc | 4 | ||||
-rw-r--r-- | src/ccache.c | 13 | ||||
-rw-r--r-- | src/compopt.c | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/doc/NEWS.adoc b/doc/NEWS.adoc index 8f68bd36..ed89a087 100644 --- a/doc/NEWS.adoc +++ b/doc/NEWS.adoc @@ -45,6 +45,10 @@ Bug fixes - Fixed a race condition when creating the initial config file in the cache directory. +- Bail out on too hard clang option `-MJ`. + +- Handle separate parameter to clang option `-target` correctly. + ccache 3.4.2 ------------ diff --git a/src/ccache.c b/src/ccache.c index 5cff0b77..7a094e95 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -2545,6 +2545,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,") diff --git a/src/compopt.c b/src/compopt.c index aab9fe55..0df2bd0a 100644 --- a/src/compopt.c +++ b/src/compopt.c @@ -46,6 +46,7 @@ static const struct compopt compopts[] = { {"-L", TAKES_ARG}, {"-M", TOO_HARD}, {"-MF", TAKES_ARG}, + {"-MJ", TAKES_ARG | TOO_HARD}, {"-MM", TOO_HARD}, {"-MQ", TAKES_ARG}, {"-MT", TAKES_ARG}, |