aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/tcmalloc
diff options
context:
space:
mode:
authordcherednik <dcherednik@ydb.tech>2022-10-26 16:40:35 +0300
committerdcherednik <dcherednik@ydb.tech>2022-10-26 16:40:35 +0300
commitb981cca279190176740c3bf5c5b4fd03be51b599 (patch)
treef5ec6210fdce0e976cbbe4dc8ae78bb6509adf49 /contrib/libs/tcmalloc
parent6dc0de995652f7eeecdbdb88dc98b00bb0653a2f (diff)
downloadydb-b981cca279190176740c3bf5c5b4fd03be51b599.tar.gz
Enable linux-arm platform.
Diffstat (limited to 'contrib/libs/tcmalloc')
-rw-r--r--contrib/libs/tcmalloc/CMakeLists.linux-aarch64.txt77
-rw-r--r--contrib/libs/tcmalloc/CMakeLists.txt4
2 files changed, 80 insertions, 1 deletions
diff --git a/contrib/libs/tcmalloc/CMakeLists.linux-aarch64.txt b/contrib/libs/tcmalloc/CMakeLists.linux-aarch64.txt
new file mode 100644
index 0000000000..35f329bacb
--- /dev/null
+++ b/contrib/libs/tcmalloc/CMakeLists.linux-aarch64.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_subdirectory(malloc_extension)
+
+add_library(contrib-libs-tcmalloc)
+target_compile_options(contrib-libs-tcmalloc PRIVATE
+ -DTCMALLOC_256K_PAGES
+ -Wno-everything
+)
+target_link_libraries(contrib-libs-tcmalloc PUBLIC
+ contrib-libs-cxxsupp
+ contrib-restricted-abseil-cpp
+ libs-tcmalloc-malloc_extension
+)
+target_sources(contrib-libs-tcmalloc PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/libs/tcmalloc/tcmalloc/want_hpaa.cc
+)
+
+add_global_library_for(contrib-libs-tcmalloc.global contrib-libs-tcmalloc)
+target_compile_options(contrib-libs-tcmalloc.global PRIVATE
+ -DTCMALLOC_256K_PAGES
+ -Wno-everything
+)
+target_link_libraries(contrib-libs-tcmalloc.global PUBLIC
+ contrib-libs-cxxsupp
+ contrib-restricted-abseil-cpp
+ libs-tcmalloc-malloc_extension
+)
+target_sources(contrib-libs-tcmalloc.global PRIVATE
+ ${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/CMakeLists.txt b/contrib/libs/tcmalloc/CMakeLists.txt
index 79468a5d8d..3e0811fb22 100644
--- a/contrib/libs/tcmalloc/CMakeLists.txt
+++ b/contrib/libs/tcmalloc/CMakeLists.txt
@@ -6,7 +6,9 @@
# original buildsystem will not be accepted.
-if (APPLE)
+if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND UNIX AND NOT APPLE AND NOT ANDROID)
+ include(CMakeLists.linux-aarch64.txt)
+elseif (APPLE)
include(CMakeLists.darwin.txt)
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE AND NOT ANDROID)
include(CMakeLists.linux.txt)