mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
cmake: remove add_definitions(-DNO_TCMALLOC), instead use ENABLE_LIBTCMALLOC from config (#375)
* Manual version update to [54135] * Temporary release script fix [#METRIQA-732] * cmake: remove add_definitions(-DNO_TCMALLOC), instead use ENABLE_LIBTCMALLOC from config
This commit is contained in:
parent
8710a82437
commit
2688f4563f
@ -1,5 +1,5 @@
|
||||
add_definitions(
|
||||
-DNO_TCMALLOC_SAMPLES -DNO_TCMALLOC_SAMPLES
|
||||
-DNO_TCMALLOC_SAMPLES
|
||||
-DNDEBUG -DNO_FRAME_POINTER
|
||||
-Wwrite-strings -Wno-sign-compare -Wno-unused-result
|
||||
-Wno-deprecated-declarations -Wno-unused-function
|
||||
|
@ -11,10 +11,6 @@ include_directories (BEFORE ${ClickHouse_SOURCE_DIR}/contrib/libre2/)
|
||||
include_directories (BEFORE ${ClickHouse_BINARY_DIR}/contrib/libre2/)
|
||||
include_directories (${ClickHouse_SOURCE_DIR}/libs/libdaemon/include/)
|
||||
|
||||
if (NOT ENABLE_LIBTCMALLOC)
|
||||
add_definitions(-DNO_TCMALLOC)
|
||||
endif ()
|
||||
|
||||
if (NOT NO_WERROR)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
||||
|
@ -9,7 +9,9 @@
|
||||
#include <DB/Databases/IDatabase.h>
|
||||
#include <chrono>
|
||||
|
||||
#ifndef NO_TCMALLOC
|
||||
#include <common/config_common.h>
|
||||
|
||||
#if ENABLE_LIBTCMALLOC
|
||||
#include <gperftools/malloc_extension.h>
|
||||
|
||||
/// Initializing malloc extension in global constructor as required.
|
||||
@ -197,7 +199,7 @@ void AsynchronousMetrics::update()
|
||||
set("MaxPartCountForPartition", max_part_count_for_partition);
|
||||
}
|
||||
|
||||
#ifndef NO_TCMALLOC
|
||||
#if ENABLE_LIBTCMALLOC
|
||||
{
|
||||
/// tcmalloc related metrics. Remove if you switch to different allocator.
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#ifndef NO_TCMALLOC
|
||||
#include <common/config_common.h>
|
||||
#if ENABLE_LIBTCMALLOC
|
||||
#include <gperftools/malloc_extension.h>
|
||||
#endif
|
||||
#include "Server.h"
|
||||
@ -36,7 +37,7 @@ static bool isClickhouseApp(const std::string & app_suffix, std::vector<char *>
|
||||
|
||||
int main(int argc_, char ** argv_)
|
||||
{
|
||||
#ifndef NO_TCMALLOC
|
||||
#if ENABLE_LIBTCMALLOC
|
||||
MallocExtension::instance()->SetNumericProperty("tcmalloc.aggressive_memory_decommit", false);
|
||||
#endif
|
||||
|
||||
|
@ -3,3 +3,4 @@
|
||||
// .h autogenerated by cmake !
|
||||
|
||||
#cmakedefine01 APPLE_SIERRA_OR_NEWER
|
||||
#cmakedefine01 ENABLE_LIBTCMALLOC
|
||||
|
Loading…
Reference in New Issue
Block a user