Skip to content

Commit

Permalink
Do not pollute env with USE_TCMALLOC
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed May 4, 2020
1 parent f9c0464 commit a99c428
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 0 additions & 6 deletions build/build_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@
#define OS_POSIX 1
#endif

// Use tcmalloc
#if (defined(OS_WIN) || defined(OS_LINUX) || defined(OS_ANDROID)) && \
!defined(NO_TCMALLOC)
#define USE_TCMALLOC 1
#endif

// Compiler detection.
#if defined(__GNUC__)
#define COMPILER_GCC 1
Expand Down
4 changes: 3 additions & 1 deletion build/config/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ config("feature_flags") {
if (use_glib) {
defines += [ "USE_GLIB=1" ]
}
if (use_allocator != "tcmalloc") {
if (use_allocator == "tcmalloc") {
defines += [ "USE_TCMALLOC" ]
} else {
defines += [ "NO_TCMALLOC" ]
}
if (is_asan || is_lsan || is_tsan || is_msan) {
Expand Down

0 comments on commit a99c428

Please sign in to comment.