Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scons: Tell the compiler to avoid internal malloc when using tcmalloc
According to the tcmalloc readme, the recommended way of compiling applications that make use of tcmalloc is to disable some optimizations in gcc that make assumptions about malloc et al. This changeset adds the necessary compiler flags for both gcc and clang. From the tcmalloc readme: "NOTE: When compiling with programs with gcc, that you plan to link with libtcmalloc, it's safest to pass in the flags -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free when compiling."
- Loading branch information