From: Mikko Rasa Date: Sun, 31 Oct 2021 08:23:34 +0000 (+0200) Subject: Use -fno-omit-frame-pointer if debug is set with optimizations X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=a1a88a589352feca01a6c273b733caf7c96ad31b;p=builder.git Use -fno-omit-frame-pointer if debug is set with optimizations --- diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index c877ae1..fe1d735 100644 --- a/source/gnucompiler.cpp +++ b/source/gnucompiler.cpp @@ -278,6 +278,8 @@ Task *GnuCompiler::run(const Target &target) const argv.push_back("-Os"); else argv.push_back(format("-O%d", binfo.optimize)); + if(binfo.debug) + argv.push_back("-fno-omit-frame-pointer"); } if(binfo.threads && architecture->get_system()!="windows" && architecture->get_system()!="darwin") argv.push_back("-pthread");