From 55bc2627dcca7f126580a0d89d786004dab2653c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 6 Aug 2017 14:00:44 +0200 Subject: Fix GCC -M/-MD logic some more --- build2/cc/compile.cxx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index 7553ac3..c703a8a 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -1861,20 +1861,13 @@ namespace build2 // args[i++] = "-M"; args[i++] = "-MG"; + args[i++] = src.path ().string ().c_str (); + args[i] = nullptr; if (cid == compiler_id::gcc) { sense_diag = false; - - // While GCC implies -w in case of -M, it seems to be possible - // to re-enable it with -W or -Werror. So we explicitly disable - // it, for good measure. - // - args[i++] = "-w"; } - - args[i++] = src.path ().string ().c_str (); - args[i] = nullptr; } else { -- cgit v1.1