From: Pavel Boldin Date: Thu, 14 Jul 2016 14:00:42 +0000 (+0200) Subject: support assembler X-Git-Tag: v3.3~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09fb1846147cc23b42f412aeaeb5480e0671c943;p=thirdparty%2Fccache.git support assembler Support compiling through the assembler output: $ gcc -S abc.c $ gcc -c abc.s --- diff --git a/ccache.c b/ccache.c index 0f9431d1e..74165f676 100644 --- a/ccache.c +++ b/ccache.c @@ -2933,7 +2933,7 @@ cc_process_args(struct args *args, struct args **preprocessor_args, goto out; } - if (!found_c_opt) { + if (!found_c_opt && !found_S_opt) { if (output_is_precompiled_header) { args_add(stripped_args, "-c"); } else { diff --git a/language.c b/language.c index b2ee5b4a3..008ff1070 100644 --- a/language.c +++ b/language.c @@ -41,11 +41,14 @@ static const struct { {".m", "objective-c"}, {".M", "objective-c++"}, {".mm", "objective-c++"}, + {".sx", "assembler-with-cpp"}, + {".S", "assembler-with-cpp"}, /* Preprocessed: */ {".i", "cpp-output"}, {".ii", "c++-cpp-output"}, {".mi", "objective-c-cpp-output"}, {".mii", "objective-c++-cpp-output"}, + {".s", "assembler"}, /* Header file (for precompilation): */ {".h", "c-header"}, {".H", "c++-header"}, @@ -88,6 +91,8 @@ static const struct { {"objective-c++-header", "objective-c++-cpp-output"}, {"objective-c++-cpp-output", "objective-c++-cpp-output"}, {"cuda", "cuda-output"}, + {"assembler-with-cpp", "assembler"}, + {"assembler", "assembler"}, {NULL, NULL} };