[gperftools] update to 2.17.2 (#48873)

Co-authored-by: toge <toge.mail@gmail.com>
This commit is contained in:
Kai Pastor
2025-12-15 21:24:16 +01:00
committed by GitHub
parent a5ade072c0
commit 4d2f194fdc
6 changed files with 22 additions and 52 deletions

View File

@@ -20,28 +20,26 @@ index e9647d5..092f40d 100644
src/stacktrace.cc
src/base/elf_mem_image.cc
src/base/vdso_support.cc)
@@ -926,4 +926,66 @@ if(MSVC)
@@ -926,4 +926,53 @@ if(MSVC)
add_subdirectory(src/windows)
endif()
+foreach(lib IN ITEMS
+ common stacktrace
+ tcmalloc_minimal tcmalloc tcmalloc_minimal_debug tcmalloc_debug
+ profiler
+)
+ if(TARGET "${lib}")
+ install(TARGETS "${lib}")
+ if(lib MATCHES "tcmalloc|profiler")
+ set(pc_file "${CMAKE_CURRENT_BINARY_DIR}/lib${lib}.pc")
+ set(pc_libs_private "${CMAKE_THREAD_LIBS_INIT}")
+ if("execinfo" IN_LIST unwind_libs AND lib MATCHES "tcmalloc")
+ string(APPEND pc_libs_private " -lexecinfo")
+ endif()
+ set(pc_requires_private "")
+ if(gperftools_enable_libunwind AND lib MATCHES "tcmalloc")
+ string(APPEND pc_requires_private " libunwind")
+ endif()
+ file(CONFIGURE OUTPUT "${pc_file}" CONTENT [[
+ set(pc_file "${CMAKE_CURRENT_BINARY_DIR}/lib${lib}.pc")
+ set(pc_libs_private "${CMAKE_THREAD_LIBS_INIT}")
+ if("execinfo" IN_LIST unwind_libs AND lib MATCHES "tcmalloc")
+ string(APPEND pc_libs_private " -lexecinfo")
+ endif()
+ set(pc_requires_private "")
+ if(gperftools_enable_libunwind AND lib MATCHES "tcmalloc")
+ string(APPEND pc_requires_private " libunwind")
+ endif()
+ file(CONFIGURE OUTPUT "${pc_file}" CONTENT [[
+prefix=
+exec_prefix=${prefix}
+libdir=${prefix}/lib
@@ -56,18 +54,7 @@ index e9647d5..092f40d 100644
+Libs.private: @pc_libs_private@
+Requires.private: @pc_requires_private@
+]] @ONLY)
+ install(FILES "${pc_file}" DESTINATION "lib/pkgconfig")
+ endif()
+ endif()
+endforeach()
+
+foreach(exe IN ITEMS addr2line-pdb nm-pdb)
+ if(NOT TARGET "${exe}")
+ continue()
+ elseif(GPERFTOOLS_BUILD_TOOLS)
+ install(TARGETS "${exe}")
+ else()
+ set_target_properties("${exe}" PROPERTIES EXCLUDE_FROM_ALL 1)
+ install(FILES "${pc_file}" DESTINATION "lib/pkgconfig")
+ endif()
+endforeach()
+
@@ -82,7 +69,7 @@ index e9647d5..092f40d 100644
+ src/gperftools/nallocx.h
+ src/gperftools/profiler.h
+ src/gperftools/stacktrace.h
+ "${CMAKE_CURRENT_BINARY_DIR}/gperftools/tcmalloc.h"
+ src/gperftools/tcmalloc.h
+ DESTINATION include/gperftools
+)
+

View File

@@ -2,14 +2,14 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO gperftools/gperftools
REF gperftools-${VERSION}
SHA512 a6eddee06cd6a9344c724522a5bb977082d6ee30eded1c6793d6bb508d4c8542a238dc0f62818c715f09312c858cc90cded0ee95ba2a3ea15fad8a0b78bcdaea
SHA512 c6f68c307f7ecc5a3ff49b616155cb6d5bcc8e7a14b52f480a4e7e6deed562e988af549cd6b3d6f9150d92561947460a2a97d3355c73b81a4d0414870c0b7d32
HEAD_REF master
PATCHES
libunwind.diff
install.diff
win32-override.diff
)
file(REMOVE_RECURSE "${SOURCE_PATH}/vendor")
file(REMOVE_RECURSE "${SOURCE_PATH}/vendor/googletest")
if("override" IN_LIST FEATURES)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_STATIC_CRT)
@@ -20,7 +20,6 @@ vcpkg_check_features(
FEATURES
libunwind gperftools_enable_libunwind
override GPERFTOOLS_WIN32_OVERRIDE
tools GPERFTOOLS_BUILD_TOOLS
)
if(gperftools_enable_libunwind)
@@ -35,10 +34,7 @@ vcpkg_cmake_configure(
"-DCMAKE_PROJECT_INCLUDE=${CURRENT_PORT_DIR}/cmake-project-include.cmake"
-Dgperftools_build_benchmark=OFF
${OPTIONS}
OPTIONS_DEBUG
-DGPERFTOOLS_BUILD_TOOLS=OFF
MAYBE_UNUSED_VARIABLES
GPERFTOOLS_BUILD_TOOLS
GPERFTOOLS_WIN32_OVERRIDE
)
vcpkg_cmake_install()
@@ -52,14 +48,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
endforeach()
endif()
if("tools" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_copy_tools(TOOL_NAMES addr2line-pdb nm-pdb AUTO_CLEAN)
endif()
# Perl script
file(INSTALL "${SOURCE_PATH}/src/pprof" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

View File

@@ -1,6 +1,6 @@
{
"name": "gperftools",
"version": "2.16",
"version": "2.17.2",
"description": "A high-performance multi-threaded malloc() implementation, plus some performance analysis tools.",
"homepage": "https://github.com/gperftools/gperftools",
"license": "BSD-3-Clause",
@@ -21,9 +21,6 @@
"override": {
"description": "Override Windows allocators",
"supports": "windows & staticcrt"
},
"tools": {
"description": "Install tools"
}
}
}

View File

@@ -6,13 +6,6 @@
"license": "MIT",
"dependencies": [
"gperftools",
{
"name": "gperftools",
"features": [
"tools"
],
"platform": "native"
},
{
"name": "gperftools",
"features": [

View File

@@ -3445,7 +3445,7 @@
"port-version": 0
},
"gperftools": {
"baseline": "2.16",
"baseline": "2.17.2",
"port-version": 0
},
"gpgme": {

View File

@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "19a4b8ddfb0a2462157b915a18fc8bca61f1d561",
"version": "2.17.2",
"port-version": 0
},
{
"git-tree": "942debf1003954f938f11be718ad6582b3059c00",
"version": "2.16",