Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build with optimizations by default (#543)
GCC builds without optimizations by default while Clang uses -O2. Use -O2 for GCC by default too, but switch to -O0 when DEBUG is defined. Also make sure to always output debug information, not only in debug builds. Additional sections with it do not impact performance but are very useful in production. And they can be easily stripped out of the binaries if necessary, like we do when building packages. We disable frame pointer omission optimization to get better stack frames and enable debugging on x86. While it has some impact, I'd rather have working backtraces.
- Loading branch information