]> git.tdb.fi Git - builder.git/commitdiff
Use -fno-omit-frame-pointer if debug is set with optimizations
authorMikko Rasa <tdb@tdb.fi>
Sun, 31 Oct 2021 08:23:34 +0000 (10:23 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 31 Oct 2021 08:23:34 +0000 (10:23 +0200)
source/gnucompiler.cpp

index c877ae13a953544ae49633cce7761b3357fd187f..fe1d735db197c6acff4512fe08721ec94b2ffaf5 100644 (file)
@@ -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");