mirror of https://github.com/microsoft/vcpkg.git
[breakpad] Add linux tools (#28878)
* breakpad - add core tools and linux ones * Don't guard the vcpkg_copy_tools for "linux", and avoid installing debug headers rather than deleting them. Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
d2b8d93276
commit
a5f93b05d1
|
|
@ -17,6 +17,7 @@ set(CMAKE_DEBUG_POSTFIX d)
|
|||
|
||||
string(COMPARE EQUAL "${CMAKE_BUILD_TYPE}" "Release" DEFAULT_INSTALL_HEADERS)
|
||||
option(INSTALL_HEADERS "Install header files" ${DEFAULT_INSTALL_HEADERS})
|
||||
option(INSTALL_TOOLS "Install tools" OFF)
|
||||
|
||||
# libbreakpad target
|
||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL Android)
|
||||
|
|
@ -99,6 +100,87 @@ target_include_directories(libbreakpad_client
|
|||
)
|
||||
list(APPEND TARGETS libbreakpad_client)
|
||||
|
||||
if(INSTALL_TOOLS)
|
||||
if(LINUX)
|
||||
add_executable(microdump_stackwalk
|
||||
src/processor/microdump_stackwalk.cc)
|
||||
target_link_libraries(microdump_stackwalk PRIVATE libbreakpad libbreakpad_client)
|
||||
install(TARGETS microdump_stackwalk DESTINATION bin)
|
||||
|
||||
add_executable(minidump_dump
|
||||
src/processor/minidump_dump.cc)
|
||||
target_link_libraries(minidump_dump PRIVATE libbreakpad libbreakpad_client)
|
||||
install(TARGETS minidump_dump DESTINATION bin)
|
||||
|
||||
add_executable(minidump_stackwalk
|
||||
src/processor/minidump_stackwalk.cc)
|
||||
target_link_libraries(minidump_stackwalk PRIVATE libbreakpad libbreakpad_client)
|
||||
install(TARGETS minidump_stackwalk DESTINATION bin)
|
||||
|
||||
add_executable(core2md
|
||||
src/tools/linux/core2md/core2md.cc)
|
||||
target_link_libraries(core2md PRIVATE libbreakpad_client)
|
||||
install(TARGETS core2md DESTINATION bin)
|
||||
|
||||
add_executable(pid2md
|
||||
src/tools/linux/pid2md/pid2md.cc)
|
||||
target_link_libraries(pid2md PRIVATE libbreakpad_client)
|
||||
install(TARGETS pid2md DESTINATION bin)
|
||||
|
||||
add_executable(dump_syms
|
||||
src/common/dwarf_cfi_to_module.cc
|
||||
src/common/dwarf_cu_to_module.cc
|
||||
src/common/dwarf_line_to_module.cc
|
||||
src/common/dwarf_range_list_handler.cc
|
||||
src/common/language.cc
|
||||
src/common/module.cc
|
||||
src/common/path_helper.cc
|
||||
src/common/stabs_reader.cc
|
||||
src/common/stabs_to_module.cc
|
||||
src/common/dwarf/bytereader.cc
|
||||
src/common/dwarf/dwarf2diehandler.cc
|
||||
src/common/dwarf/dwarf2reader.cc
|
||||
src/common/dwarf/elf_reader.cc
|
||||
src/common/linux/crc32.cc
|
||||
src/common/linux/dump_symbols.cc
|
||||
src/common/linux/elf_symbols_to_module.cc
|
||||
src/common/linux/elfutils.cc
|
||||
src/common/linux/file_id.cc
|
||||
src/common/linux/linux_libc_support.cc
|
||||
src/common/linux/memory_mapped_file.cc
|
||||
src/common/linux/safe_readlink.cc
|
||||
src/tools/linux/dump_syms/dump_syms.cc)
|
||||
target_link_libraries(dump_syms PRIVATE libbreakpad_client)
|
||||
install(TARGETS dump_syms DESTINATION bin)
|
||||
|
||||
add_executable(minidump-2-core
|
||||
src/common/linux/memory_mapped_file.cc
|
||||
src/tools/linux/md2core/minidump-2-core.cc)
|
||||
target_link_libraries(minidump-2-core PRIVATE libbreakpad_client)
|
||||
install(TARGETS minidump-2-core DESTINATION bin)
|
||||
|
||||
add_executable(minidump_upload
|
||||
src/common/linux/http_upload.cc
|
||||
src/tools/linux/symupload/minidump_upload.cc)
|
||||
target_link_libraries(minidump_upload PRIVATE libbreakpad_client ${CMAKE_DL_LIBS})
|
||||
install(TARGETS minidump_upload DESTINATION bin)
|
||||
|
||||
add_executable(sym_upload
|
||||
src/common/linux/http_upload.cc
|
||||
src/common/linux/libcurl_wrapper.cc
|
||||
src/common/linux/symbol_collector_client.cc
|
||||
src/common/linux/symbol_upload.cc
|
||||
src/tools/linux/symupload/sym_upload.cc)
|
||||
target_link_libraries(sym_upload PRIVATE libbreakpad_client ${CMAKE_DL_LIBS})
|
||||
install(TARGETS sym_upload DESTINATION bin)
|
||||
|
||||
add_executable(core_handler
|
||||
src/tools/linux/core_handler/core_handler.cc)
|
||||
target_link_libraries(core_handler PRIVATE libbreakpad_client)
|
||||
install(TARGETS core_handler DESTINATION bin)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# installation
|
||||
install(TARGETS ${TARGETS} EXPORT unofficial-breakpad-targets
|
||||
RUNTIME DESTINATION bin
|
||||
|
|
|
|||
|
|
@ -16,21 +16,31 @@ if(VCPKG_HOST_IS_LINUX OR VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID)
|
|||
URL https://chromium.googlesource.com/linux-syscall-support
|
||||
REF 7bde79cc274d06451bf65ae82c012a5d3e476b5a
|
||||
)
|
||||
|
||||
|
||||
file(RENAME "${LSS_SOURCE_PATH}" "${SOURCE_PATH}/src/third_party/lss")
|
||||
endif()
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${CMAKE_CURRENT_LIST_DIR}/check_getcontext.cc" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
"tools" INSTALL_TOOLS
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
OPTIONS_RELEASE
|
||||
-DINSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/client/linux/data" "${CURRENT_PACKAGES_DIR}/include/client/linux/sender")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/client/linux/data" "${CURRENT_PACKAGES_DIR}/include/client/linux/sender")
|
||||
|
||||
if("tools" IN_LIST FEATURES)
|
||||
vcpkg_copy_tools(TOOL_NAMES microdump_stackwalk minidump_dump minidump_stackwalk core2md pid2md dump_syms minidump-2-core minidump_upload sym_upload core_handler AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-breakpad CONFIG_PATH share/unofficial-breakpad)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
{
|
||||
"name": "breakpad",
|
||||
"version-date": "2022-07-12",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "a set of client and server components which implement a crash-reporting system.",
|
||||
"homepage": "https://github.com/google/breakpad",
|
||||
"license": "BSD-3-Clause",
|
||||
"supports": "!uwp & (!windows | !arm) & (!windows | !arm64)",
|
||||
"dependencies": [
|
||||
"libdisasm",
|
||||
|
|
@ -15,5 +16,11 @@
|
|||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"features": {
|
||||
"tools": {
|
||||
"description": "Build breakpad tools",
|
||||
"supports": "linux"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "268892865b8587f365f04b7f2fe62a2359c405ae",
|
||||
"version-date": "2022-07-12",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "8b789572b559ed292fc35ad004d51d6d975b7d7f",
|
||||
"version-date": "2022-07-12",
|
||||
|
|
|
|||
|
|
@ -1198,7 +1198,7 @@
|
|||
},
|
||||
"breakpad": {
|
||||
"baseline": "2022-07-12",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"brigand": {
|
||||
"baseline": "1.3.0",
|
||||
|
|
|
|||
Loading…
Reference in New Issue