2022-09-06 19:14:07 -04:00
|
|
|
# Copyright 2015 The Crashpad Authors
|
2017-11-17 17:48:22 -08:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
import("../build/crashpad_buildconfig.gni")
|
|
|
|
|
2020-09-14 14:22:05 -07:00
|
|
|
crashpad_static_library("minidump") {
|
2017-11-17 17:48:22 -08:00
|
|
|
sources = [
|
|
|
|
"minidump_annotation_writer.cc",
|
|
|
|
"minidump_annotation_writer.h",
|
|
|
|
"minidump_byte_array_writer.cc",
|
|
|
|
"minidump_byte_array_writer.h",
|
|
|
|
"minidump_context_writer.cc",
|
|
|
|
"minidump_context_writer.h",
|
|
|
|
"minidump_crashpad_info_writer.cc",
|
|
|
|
"minidump_crashpad_info_writer.h",
|
|
|
|
"minidump_exception_writer.cc",
|
|
|
|
"minidump_exception_writer.h",
|
|
|
|
"minidump_file_writer.cc",
|
|
|
|
"minidump_file_writer.h",
|
|
|
|
"minidump_handle_writer.cc",
|
|
|
|
"minidump_handle_writer.h",
|
|
|
|
"minidump_memory_info_writer.cc",
|
|
|
|
"minidump_memory_info_writer.h",
|
|
|
|
"minidump_memory_writer.cc",
|
|
|
|
"minidump_memory_writer.h",
|
|
|
|
"minidump_misc_info_writer.cc",
|
|
|
|
"minidump_misc_info_writer.h",
|
|
|
|
"minidump_module_crashpad_info_writer.cc",
|
|
|
|
"minidump_module_crashpad_info_writer.h",
|
|
|
|
"minidump_module_writer.cc",
|
|
|
|
"minidump_module_writer.h",
|
|
|
|
"minidump_rva_list_writer.cc",
|
|
|
|
"minidump_rva_list_writer.h",
|
|
|
|
"minidump_simple_string_dictionary_writer.cc",
|
|
|
|
"minidump_simple_string_dictionary_writer.h",
|
|
|
|
"minidump_stream_writer.cc",
|
|
|
|
"minidump_stream_writer.h",
|
|
|
|
"minidump_string_writer.cc",
|
|
|
|
"minidump_string_writer.h",
|
|
|
|
"minidump_system_info_writer.cc",
|
|
|
|
"minidump_system_info_writer.h",
|
|
|
|
"minidump_thread_id_map.cc",
|
|
|
|
"minidump_thread_id_map.h",
|
2022-06-06 09:29:39 -06:00
|
|
|
"minidump_thread_name_list_writer.cc",
|
|
|
|
"minidump_thread_name_list_writer.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
"minidump_thread_writer.cc",
|
|
|
|
"minidump_thread_writer.h",
|
|
|
|
"minidump_unloaded_module_writer.cc",
|
|
|
|
"minidump_unloaded_module_writer.h",
|
|
|
|
"minidump_user_extension_stream_data_source.cc",
|
|
|
|
"minidump_user_extension_stream_data_source.h",
|
|
|
|
"minidump_user_stream_writer.cc",
|
|
|
|
"minidump_user_stream_writer.h",
|
|
|
|
"minidump_writable.cc",
|
|
|
|
"minidump_writable.h",
|
|
|
|
"minidump_writer_util.cc",
|
|
|
|
"minidump_writer_util.h",
|
|
|
|
]
|
|
|
|
|
2017-11-28 10:31:13 -08:00
|
|
|
public_configs = [ "..:crashpad_config" ]
|
2017-11-17 17:48:22 -08:00
|
|
|
|
2020-04-10 17:40:41 -04:00
|
|
|
public_deps = [
|
|
|
|
":format",
|
|
|
|
"../compat",
|
|
|
|
]
|
2017-11-17 17:48:22 -08:00
|
|
|
|
|
|
|
deps = [
|
2017-11-28 10:31:13 -08:00
|
|
|
"../snapshot",
|
2021-07-28 23:57:54 +00:00
|
|
|
"$mini_chromium_source_parent:base",
|
2017-11-28 10:31:13 -08:00
|
|
|
"../util",
|
2017-11-17 17:48:22 -08:00
|
|
|
]
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
if (crashpad_is_win) {
|
2017-11-17 17:48:22 -08:00
|
|
|
cflags = [
|
|
|
|
"/wd4201", # nonstandard extension used : nameless struct/union
|
|
|
|
"/wd4324", # 'struct' : structure was padded due to __declspec(align())
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-10 17:40:41 -04:00
|
|
|
# :format is the only part of minidump that snapshot may depend on.
|
|
|
|
static_library("format") {
|
|
|
|
sources = [
|
|
|
|
"minidump_context.h",
|
|
|
|
"minidump_extensions.cc",
|
|
|
|
"minidump_extensions.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
public_configs = [ "..:crashpad_config" ]
|
|
|
|
|
|
|
|
public_deps = [ "../compat" ]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
"../snapshot:context",
|
2021-07-28 23:57:54 +00:00
|
|
|
"$mini_chromium_source_parent:base",
|
2020-04-10 17:40:41 -04:00
|
|
|
"../util",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-11-17 17:48:22 -08:00
|
|
|
static_library("test_support") {
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
"test/minidump_byte_array_writer_test_util.cc",
|
|
|
|
"test/minidump_byte_array_writer_test_util.h",
|
|
|
|
"test/minidump_context_test_util.cc",
|
|
|
|
"test/minidump_context_test_util.h",
|
|
|
|
"test/minidump_file_writer_test_util.cc",
|
|
|
|
"test/minidump_file_writer_test_util.h",
|
|
|
|
"test/minidump_memory_writer_test_util.cc",
|
|
|
|
"test/minidump_memory_writer_test_util.h",
|
|
|
|
"test/minidump_rva_list_test_util.cc",
|
|
|
|
"test/minidump_rva_list_test_util.h",
|
|
|
|
"test/minidump_string_writer_test_util.cc",
|
|
|
|
"test/minidump_string_writer_test_util.h",
|
|
|
|
"test/minidump_user_extension_stream_util.cc",
|
|
|
|
"test/minidump_user_extension_stream_util.h",
|
|
|
|
"test/minidump_writable_test_util.cc",
|
|
|
|
"test/minidump_writable_test_util.h",
|
|
|
|
]
|
|
|
|
|
2017-11-28 10:31:13 -08:00
|
|
|
public_configs = [ "..:crashpad_config" ]
|
2017-11-17 17:48:22 -08:00
|
|
|
|
2020-01-23 08:00:33 -05:00
|
|
|
public_deps = [ ":minidump" ]
|
2017-11-17 17:48:22 -08:00
|
|
|
|
|
|
|
deps = [
|
2020-04-10 17:40:41 -04:00
|
|
|
"../snapshot:test_support",
|
|
|
|
"../test",
|
2020-05-06 20:39:19 -04:00
|
|
|
"../third_party/googletest:googletest",
|
2021-07-28 23:57:54 +00:00
|
|
|
"$mini_chromium_source_parent:base",
|
2020-04-10 17:40:41 -04:00
|
|
|
"../util",
|
2017-11-17 17:48:22 -08:00
|
|
|
]
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
if (crashpad_is_win) {
|
2017-11-17 17:48:22 -08:00
|
|
|
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
source_set("minidump_test") {
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
"minidump_annotation_writer_test.cc",
|
|
|
|
"minidump_byte_array_writer_test.cc",
|
|
|
|
"minidump_context_writer_test.cc",
|
|
|
|
"minidump_crashpad_info_writer_test.cc",
|
|
|
|
"minidump_exception_writer_test.cc",
|
|
|
|
"minidump_file_writer_test.cc",
|
|
|
|
"minidump_handle_writer_test.cc",
|
|
|
|
"minidump_memory_info_writer_test.cc",
|
|
|
|
"minidump_memory_writer_test.cc",
|
|
|
|
"minidump_misc_info_writer_test.cc",
|
|
|
|
"minidump_module_crashpad_info_writer_test.cc",
|
|
|
|
"minidump_module_writer_test.cc",
|
|
|
|
"minidump_rva_list_writer_test.cc",
|
|
|
|
"minidump_simple_string_dictionary_writer_test.cc",
|
|
|
|
"minidump_string_writer_test.cc",
|
|
|
|
"minidump_system_info_writer_test.cc",
|
|
|
|
"minidump_thread_id_map_test.cc",
|
2022-06-06 09:29:39 -06:00
|
|
|
"minidump_thread_name_list_writer_test.cc",
|
2017-11-17 17:48:22 -08:00
|
|
|
"minidump_thread_writer_test.cc",
|
|
|
|
"minidump_unloaded_module_writer_test.cc",
|
|
|
|
"minidump_user_stream_writer_test.cc",
|
|
|
|
"minidump_writable_test.cc",
|
|
|
|
]
|
|
|
|
|
2020-01-23 08:00:33 -05:00
|
|
|
configs += [ "../build:crashpad_is_in_fuchsia" ]
|
2018-09-28 14:33:13 -07:00
|
|
|
|
2017-11-17 17:48:22 -08:00
|
|
|
deps = [
|
|
|
|
":test_support",
|
2017-11-28 10:31:13 -08:00
|
|
|
"../snapshot:test_support",
|
|
|
|
"../test",
|
2020-05-06 20:39:19 -04:00
|
|
|
"../third_party/googletest:googletest",
|
2021-07-28 23:57:54 +00:00
|
|
|
"$mini_chromium_source_parent:base",
|
2017-11-28 10:31:13 -08:00
|
|
|
"../util",
|
2017-11-17 17:48:22 -08:00
|
|
|
]
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
if (crashpad_is_win) {
|
2017-11-17 17:48:22 -08:00
|
|
|
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
|
|
|
|
}
|
|
|
|
}
|