From d6f506433bb7d4556fe0cf76b93e1501e5cd724d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Anders=20Bj=C3=B6rklund?= Date: Sun, 30 Oct 2016 22:22:27 +0100 Subject: [PATCH] Allow the pump wrapper from distcc to use stdout The shell wrapper for "distcc-pump" outputs some useless progress information to stdout. Let it do that without failing the compile. --- ccache.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ccache.c b/ccache.c index 9fbbdd7d4..a5adea8a4 100644 --- a/ccache.c +++ b/ccache.c @@ -1069,6 +1069,15 @@ void update_manifest_file(void) } } +static bool +compiler_is_pump(struct args *args) +{ + char *name = basename(args->argv[0]); + bool result = str_eq(name, "pump") || str_eq(name, "distcc-pump"); + free(name); + return result; +} + // Run the real compiler and put the result in cache. static void to_cache(struct args *args) @@ -1160,7 +1169,8 @@ to_cache(struct args *args) } failed(); } - if (st.st_size != 0) { + // distcc-pump outputs lines like "__________Using # distcc servers in pump mode" + if (st.st_size != 0 && !compiler_is_pump(args)) { cc_log("Compiler produced stdout"); stats_update(STATS_STDOUT); tmp_unlink(tmp_stdout); -- 2.47.2