From: Pavol Sakac <26042917+pavsa@users.noreply.github.com> Date: Tue, 2 Apr 2019 18:57:38 +0000 (+0200) Subject: Handle -g0 properly (#371) X-Git-Tag: v3.7~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afa4eea15a98417aedc66be7db3175d6de1dd43f;p=thirdparty%2Fccache.git Handle -g0 properly (#371) --- diff --git a/src/ccache.c b/src/ccache.c index 6bb63a013..d49fe86a0 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -2635,6 +2635,11 @@ cc_process_args(struct args *args, struct args **preprocessor_args, // Debugging is handled specially, so that we know if we can strip line // number info. + if (str_eq(argv[i], "-g0")) { + generating_debuginfo = false; + continue; + } + if (str_startswith(argv[i], "-g")) { generating_debuginfo = true; args_add(stripped_args, argv[i]); diff --git a/test/suites/depend.bash b/test/suites/depend.bash index 3d2f2adc1..00a2b693c 100644 --- a/test/suites/depend.bash +++ b/test/suites/depend.bash @@ -78,7 +78,7 @@ EOF backdate "$BASEDIR3/header.h" "$BASEDIR3/test.c" backdate "$BASEDIR4/header.h" "$BASEDIR4/test.c" "$BASEDIR4/header2.h" - DEPFLAGS="-MD -MF test.d" + DEPFLAGS="-g1 -g0 -MD -MF test.d" } generate_reference_compiler_output() {