From d16cb58c65e56754189d2ee15b9aa51056b0dca8 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Wed, 27 Jul 2016 10:42:03 +0200 Subject: [PATCH] Don't pass -fcolor-diagnostics to Clang when compiling assembler This avoids an "argument unused during compilation: '-fcolor-diagnostics'" warning. --- ccache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ccache.c b/ccache.c index 5f9a46ebb..0a2e3b72a 100644 --- 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 -- 2.47.2