aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-06-20 23:19:52 +0300
committerAnton Samokhvalov <pg83@yandex.ru>2022-06-20 23:19:52 +0300
commit711dc2153cf3b578e9a51efe904fcd5da68fd931 (patch)
treecd099c40ef6664f639d305291bdd14c84acd4ecb /contrib
parent1940182aa37a8912f9609df6c24dbc64a05dbc53 (diff)
downloadydb-711dc2153cf3b578e9a51efe904fcd5da68fd931.tar.gz
CPPCOM-76
ref:e958c28af9ec0f6324837115269d9c6a255e4a8a
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libs/llvm12/utils/TableGen/CMakeLists.linux.txt3
-rw-r--r--contrib/libs/tcmalloc/no_percpu_cache/CMakeLists.linux.txt77
-rw-r--r--contrib/libs/tcmalloc/no_percpu_cache/CMakeLists.txt11
-rw-r--r--contrib/libs/tcmalloc/no_percpu_cache/aligned_alloc.c6
-rw-r--r--contrib/libs/tcmalloc/tcmalloc/internal/percpu.cc3
-rw-r--r--contrib/tools/protoc/bin/CMakeLists.linux.txt3
-rw-r--r--contrib/tools/protoc/plugins/cpp_styleguide/CMakeLists.linux.txt3
-rw-r--r--contrib/tools/protoc/plugins/grpc_cpp/CMakeLists.linux.txt3
8 files changed, 105 insertions, 4 deletions
diff --git a/contrib/libs/llvm12/utils/TableGen/CMakeLists.linux.txt b/contrib/libs/llvm12/utils/TableGen/CMakeLists.linux.txt
index 875a0af01f..d5ef10a534 100644
--- a/contrib/libs/llvm12/utils/TableGen/CMakeLists.linux.txt
+++ b/contrib/libs/llvm12/utils/TableGen/CMakeLists.linux.txt
@@ -13,7 +13,8 @@ target_include_directories(llvm-tblgen PRIVATE
)
target_link_libraries(llvm-tblgen PUBLIC
contrib-libs-cxxsupp
- library-cpp-lfalloc
+ cpp-malloc-tcmalloc
+ libs-tcmalloc-no_percpu_cache
contrib-libs-llvm12
llvm12-lib-Demangle
llvm12-lib-Support
diff --git a/contrib/libs/tcmalloc/no_percpu_cache/CMakeLists.linux.txt b/contrib/libs/tcmalloc/no_percpu_cache/CMakeLists.linux.txt
new file mode 100644
index 0000000000..2144bdb09a
--- /dev/null
+++ b/contrib/libs/tcmalloc/no_percpu_cache/CMakeLists.linux.txt
@@ -0,0 +1,77 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(libs-tcmalloc-no_percpu_cache)
+target_compile_options(libs-tcmalloc-no_percpu_cache PRIVATE
+ -DTCMALLOC_256K_PAGES
+ -DTCMALLOC_DEPRECATED_PERTHREAD
+)
+target_link_libraries(libs-tcmalloc-no_percpu_cache PUBLIC
+ contrib-libs-cxxsupp
+ contrib-restricted-abseil-cpp
+ libs-tcmalloc-malloc_extension
+)
+target_sources(libs-tcmalloc-no_percpu_cache PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/no_percpu_cache/aligned_alloc.c
+)
+
+add_global_library_for(libs-tcmalloc-no_percpu_cache.global libs-tcmalloc-no_percpu_cache)
+target_compile_options(libs-tcmalloc-no_percpu_cache.global PRIVATE
+ -DTCMALLOC_256K_PAGES
+ -DTCMALLOC_DEPRECATED_PERTHREAD
+)
+target_link_libraries(libs-tcmalloc-no_percpu_cache.global PUBLIC
+ contrib-libs-cxxsupp
+ contrib-restricted-abseil-cpp
+ libs-tcmalloc-malloc_extension
+)
+target_sources(libs-tcmalloc-no_percpu_cache.global PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/want_hpaa.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/tcmalloc.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/arena.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/background.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/central_freelist.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/common.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/cpu_cache.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/experimental_pow2_below64_size_class.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/experimental_pow2_size_class.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/legacy_size_classes.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/guarded_page_allocator.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/huge_address_map.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/huge_allocator.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/huge_cache.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/huge_page_aware_allocator.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/page_allocator.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/page_allocator_interface.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/page_heap.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/pagemap.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/parameters.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/peak_heap_tracker.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/sampler.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/size_classes.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/span.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/stack_trace_table.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/static_vars.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/stats.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/system-alloc.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/thread_cache.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/transfer_cache.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/experiment.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/noruntime_size_classes.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/internal/cache_topology.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/internal/environment.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/internal/logging.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/internal/memory_stats.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/internal/mincore.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/internal/numa.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/internal/percpu.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/internal/percpu_rseq_asm.S
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/internal/percpu_rseq_unsupported.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/internal/util.cc
+)
diff --git a/contrib/libs/tcmalloc/no_percpu_cache/CMakeLists.txt b/contrib/libs/tcmalloc/no_percpu_cache/CMakeLists.txt
new file mode 100644
index 0000000000..c031ddb850
--- /dev/null
+++ b/contrib/libs/tcmalloc/no_percpu_cache/CMakeLists.txt
@@ -0,0 +1,11 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+if (UNIX)
+ include(CMakeLists.linux.txt)
+endif()
diff --git a/contrib/libs/tcmalloc/no_percpu_cache/aligned_alloc.c b/contrib/libs/tcmalloc/no_percpu_cache/aligned_alloc.c
new file mode 100644
index 0000000000..b9db99adf6
--- /dev/null
+++ b/contrib/libs/tcmalloc/no_percpu_cache/aligned_alloc.c
@@ -0,0 +1,6 @@
+#include <malloc.h>
+#include <stdlib.h>
+
+void* aligned_alloc(size_t alignment, size_t size) {
+ return memalign(alignment, size);
+}
diff --git a/contrib/libs/tcmalloc/tcmalloc/internal/percpu.cc b/contrib/libs/tcmalloc/tcmalloc/internal/percpu.cc
index f8706f0f21..7b777d4828 100644
--- a/contrib/libs/tcmalloc/tcmalloc/internal/percpu.cc
+++ b/contrib/libs/tcmalloc/tcmalloc/internal/percpu.cc
@@ -19,6 +19,9 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <syscall.h>
+#if defined(__linux__)
+#include <asm-generic/unistd.h>
+#endif
#include <unistd.h>
#include <atomic>
diff --git a/contrib/tools/protoc/bin/CMakeLists.linux.txt b/contrib/tools/protoc/bin/CMakeLists.linux.txt
index 59419fb969..cce99f7883 100644
--- a/contrib/tools/protoc/bin/CMakeLists.linux.txt
+++ b/contrib/tools/protoc/bin/CMakeLists.linux.txt
@@ -11,7 +11,8 @@ add_executable(protoc)
target_link_libraries(protoc PUBLIC
contrib-libs-cxxsupp
yutil
- library-cpp-lfalloc
+ cpp-malloc-tcmalloc
+ libs-tcmalloc-no_percpu_cache
library-cpp-cpuid_check
contrib-libs-protoc
)
diff --git a/contrib/tools/protoc/plugins/cpp_styleguide/CMakeLists.linux.txt b/contrib/tools/protoc/plugins/cpp_styleguide/CMakeLists.linux.txt
index 84ec725be3..c69218ab6b 100644
--- a/contrib/tools/protoc/plugins/cpp_styleguide/CMakeLists.linux.txt
+++ b/contrib/tools/protoc/plugins/cpp_styleguide/CMakeLists.linux.txt
@@ -11,7 +11,8 @@ add_executable(cpp_styleguide)
target_link_libraries(cpp_styleguide PUBLIC
contrib-libs-cxxsupp
yutil
- library-cpp-lfalloc
+ cpp-malloc-tcmalloc
+ libs-tcmalloc-no_percpu_cache
library-cpp-cpuid_check
contrib-libs-protoc
)
diff --git a/contrib/tools/protoc/plugins/grpc_cpp/CMakeLists.linux.txt b/contrib/tools/protoc/plugins/grpc_cpp/CMakeLists.linux.txt
index e93850280e..cca3c062db 100644
--- a/contrib/tools/protoc/plugins/grpc_cpp/CMakeLists.linux.txt
+++ b/contrib/tools/protoc/plugins/grpc_cpp/CMakeLists.linux.txt
@@ -18,7 +18,8 @@ target_include_directories(grpc_cpp PRIVATE
target_link_libraries(grpc_cpp PUBLIC
contrib-libs-cxxsupp
yutil
- library-cpp-lfalloc
+ cpp-malloc-tcmalloc
+ libs-tcmalloc-no_percpu_cache
library-cpp-cpuid_check
src-compiler-grpc_plugin_support
)