Hey guys really loving the distro but i'm running into a major issue. When compiling c++ code optimisation is being applied to debug builds making debugging almost impossible. I have tried the same project and setup on multiple installs of Souls on two separate machines with identical results but the code compiles correctly on other distros.

I'm probably missing something simple so any help would be gratefully received.

remoof Yes, as stated compiling the code works fine and all tools are presents, if just never creates any actually debugable code as everything is optimised away regardless of build setting.

See these patches (1, 2) which Solus applies to GCC. Yes, Solus' GCC has O1 optimizations enabled by default, but you can pass O0 to compiler options to have code built without any optimizations.

    aleksvor Thanks aleksvor had a feeling it would be something like this overriding a default somewhere. Problem solved. Cheers need to update my template project for Solus 🙂 Just needed a set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") adding to the config.

    Isn't default behavior supposed to be -o0? Doesn't this break many projects' debug builds? Doesn't this make it harder to use Solus to contribute to projects?

      xahodo I would't say its an issue it shouldn't brake builds, just makes activity debugging certain sections of code slightly harder if you don't know about the patches.