From: Matthew Fernandez Date: Sat, 14 Nov 2020 19:07:37 +0000 (-0800) Subject: include advice to disable assertions in a profiling build X-Git-Tag: 2.46.1~31^2~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=528c15b841b2e4c315afa45a558ae74c2d611494;p=graphviz include advice to disable assertions in a profiling build Something I overlooked in bfd08ce02f62e2c7700f71e36afa5c771062e842. --- diff --git a/DEVELOPERS.md b/DEVELOPERS.md index addf9791a..55ab2c159 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -149,7 +149,8 @@ env CFLAGS="..." CXXFLAGS="..." ./configure You should use the maximum optimization level for your compiler. E.g. `-O3` for GCC and Clang. If your toolchain supports it, it is recommended to also enable -link-time optimization (`-flto`). +link-time optimization (`-flto`). You should also disable runtime assertions +with `-DNDEBUG`. You can further optimize compilation for the machine you are building on with `-march=native -mtune=native`. Be aware that the resulting binaries will no @@ -163,8 +164,8 @@ feedback. You can enable this on GCC and Clang with `-g`. Putting this all together: ```sh -env CFLAGS="-O3 -flto -march=native -mtune=native -g" \ - CXXFLAGS="-O3 -flto -march=native -mtune=native -g" ./configure +env CFLAGS="-O3 -flto -DNDEBUG -march=native -mtune=native -g" \ + CXXFLAGS="-O3 -flto -DNDEBUG -march=native -mtune=native -g" ./configure ``` ### Profiling