diff --git a/build/build_config.h b/build/build_config.h index fc96169..ede6c32 100755 --- a/build/build_config.h +++ b/build/build_config.h @@ -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 diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index f9c54f6..991cbc1 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn @@ -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) {