SHA256
1
0
forked from pool/ccache
ccache/xclang.patch
2013-01-07 09:55:06 +00:00

46 lines
1.4 KiB
Diff

commit 8e005b067d8c2423e24ee14ffdee8343f650f1e8
Author: Bernhard Bauer <bauerb@chromium.org>
Date: Tue Aug 16 10:23:55 2011 +0200
Support -Xclang compiler option.
diff --git a/compopt.c b/compopt.c
index 35d51ad..77b57f5 100644
--- a/compopt.c
+++ b/compopt.c
@@ -49,6 +49,7 @@ static const struct compopt compopts[] = {
{"-U", AFFECTS_CPP | TAKES_ARG | TAKES_CONCAT_ARG},
{"-V", TAKES_ARG},
{"-Xassembler", TAKES_ARG},
+ {"-Xclang", TAKES_ARG},
{"-Xlinker", TAKES_ARG},
{"-Xpreprocessor", TOO_HARD_DIRECT | TAKES_ARG},
{"-aux-info", TAKES_ARG},
commit 06be1c4cc33bf2def9c6e64483b397128f57dbe3
Author: Lubos Lunak <l.lunak@suse.cz>
Date: Thu Jul 26 14:45:16 2012 +0200
hash also Clang plugins
diff --git a/ccache.c b/ccache.c
index 50b4260..738c022 100644
--- a/ccache.c
+++ b/ccache.c
@@ -972,6 +972,16 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode)
continue;
}
+ if (str_eq(args->argv[i], "-Xclang")
+ && i + 3 < args->argc
+ && str_eq(args->argv[i+1], "-load")
+ && str_eq(args->argv[i+2], "-Xclang")
+ && stat(args->argv[i+3], &st) == 0) {
+ hash_delimiter(hash, "plugin");
+ hash_compiler(hash, &st, args->argv[i+3], false);
+ continue;
+ }
+
/* All other arguments are included in the hash. */
hash_delimiter(hash, "arg");
hash_string(hash, args->argv[i]);