]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Don't pass -fcolor-diagnostics to Clang when compiling assembler
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 27 Jul 2016 08:42:03 +0000 (10:42 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 27 Jul 2016 18:00:10 +0000 (20:00 +0200)
This avoids an "argument unused during compilation:
'-fcolor-diagnostics'" warning.

ccache.c

index 5f9a46ebb50b7dcf7068994d1956fa6279e484a0..0a2e3b72a72e6a7c4bb57f9eaca72f78333a8be6 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -2842,8 +2842,10 @@ cc_process_args(struct args *args, struct args **preprocessor_args,
        // default, so force it explicitly if it would be otherwise done.
        if (!found_color_diagnostics && color_output_possible()) {
                if (compiler_is_clang(args)) {
-                       args_add(stripped_args, "-fcolor-diagnostics");
-                       cc_log("Automatically enabling colors");
+                       if (!str_eq(actual_language, "assembler")) {
+                               args_add(stripped_args, "-fcolor-diagnostics");
+                               cc_log("Automatically enabling colors");
+                       }
                } else if (compiler_is_gcc(args)) {
                        // GCC has it since 4.9, but that'd require detecting what GCC version is
                        // used for the actual compile. However it requires also GCC_COLORS to be