diff options
author | Jack Lloyd <[email protected]> | 2015-10-26 14:12:23 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-10-26 14:12:23 -0400 |
commit | 54540244c1d89faa5b359c75a9c38b6fed0a08c9 (patch) | |
tree | 5725737a423af9a6224da7b060c385d886161fec /src/build-data/cc/gcc.txt | |
parent | 475a9dacb8d285d6e5a0244bcf816d2ae72a00a8 (diff) |
Remove the strange conjoining of debug and optimization flags.
Previously a build had optimizations disabled completely when debug info was
emitted. But there are many reasons to use optimized builds with debug symbols
(running under valgrind, against afl, with Asan/Ubsan, in prod, etc).
And personally I find even debugging at -O2 or -O3 is fine most of the time and
worth it for the speed. Use the (now documented!) --no-optimizations flag if no
optimization is desired while debugging.
This also removes the distinction between library and application compile flags;
there is a single optimization level that is probably good enough for everything.
On Win32 it removes definding _CONSOLE for the application. This seems to be
some mythical value that may have been required at some point, but is not
documented anywhere I can find. Who knows what VC thinks, hoping I don't have to
add this back. It also drops defining `EBUG` which is what happens when you
tell cl.exe to '/DEBUG'. LOL.
Diffstat (limited to 'src/build-data/cc/gcc.txt')
-rw-r--r-- | src/build-data/cc/gcc.txt | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt index 4eacacef2..3531e9355 100644 --- a/src/build-data/cc/gcc.txt +++ b/src/build-data/cc/gcc.txt @@ -11,12 +11,9 @@ lang_flags "-std=c++11 -D_REENTRANT" maintainer_warning_flags "-Wold-style-cast -Werror -Wno-error=old-style-cast -Wno-error=zero-as-null-pointer-constant -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=strict-overflow" warning_flags "-Wall -Wextra -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wzero-as-null-pointer-constant" -compile_flags_release "-c" -compile_flags_debug "-c -g" -lib_opt_flags_release "-O2" -lib_opt_flags_debug "-O0" -app_opt_flags_release "-O2" -app_opt_flags_debug "-O0" +compile_flags "-c" +debug_info_flags "-g" +optimization_flags "-O2" shared_flags "-fPIC" coverage_flags "--coverage" |