crashpad/snapshot/BUILD.gn

660 lines
20 KiB
Plaintext
Raw Normal View History

# Copyright 2015 The Crashpad Authors
#
# 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.
import("../build/crashpad_buildconfig.gni")
import("../build/crashpad_fuzzer_test.gni")
if (crashpad_is_in_chromium) {
import("//build/config/compiler/compiler.gni")
}
crashpad_static_library("snapshot") {
sources = [
"annotation_snapshot.cc",
"annotation_snapshot.h",
"capture_memory.cc",
"capture_memory.h",
"crashpad_info_client_options.cc",
"crashpad_info_client_options.h",
"exception_snapshot.h",
"handle_snapshot.cc",
"handle_snapshot.h",
"memory_snapshot.cc",
"memory_snapshot.h",
"memory_snapshot_generic.h",
"minidump/exception_snapshot_minidump.cc",
"minidump/exception_snapshot_minidump.h",
"minidump/memory_snapshot_minidump.cc",
"minidump/memory_snapshot_minidump.h",
"minidump/minidump_annotation_reader.cc",
"minidump/minidump_annotation_reader.h",
"minidump/minidump_context_converter.cc",
"minidump/minidump_context_converter.h",
"minidump/minidump_simple_string_dictionary_reader.cc",
"minidump/minidump_simple_string_dictionary_reader.h",
"minidump/minidump_stream.h",
"minidump/minidump_string_list_reader.cc",
"minidump/minidump_string_list_reader.h",
"minidump/minidump_string_reader.cc",
"minidump/minidump_string_reader.h",
"minidump/module_snapshot_minidump.cc",
"minidump/module_snapshot_minidump.h",
"minidump/process_snapshot_minidump.cc",
"minidump/process_snapshot_minidump.h",
"minidump/system_snapshot_minidump.cc",
"minidump/system_snapshot_minidump.h",
"minidump/thread_snapshot_minidump.cc",
"minidump/thread_snapshot_minidump.h",
"module_snapshot.h",
"process_snapshot.h",
"snapshot_constants.h",
"system_snapshot.h",
"thread_snapshot.h",
"unloaded_module_snapshot.cc",
"unloaded_module_snapshot.h",
]
if (crashpad_is_posix || crashpad_is_fuchsia) {
sources += [
"posix/timezone.cc",
"posix/timezone.h",
]
}
if (crashpad_is_mac) {
sources += [
"mac/cpu_context_mac.cc",
"mac/cpu_context_mac.h",
"mac/exception_snapshot_mac.cc",
"mac/exception_snapshot_mac.h",
"mac/mach_o_image_annotations_reader.cc",
"mac/mach_o_image_annotations_reader.h",
"mac/mach_o_image_reader.cc",
"mac/mach_o_image_reader.h",
"mac/mach_o_image_segment_reader.cc",
"mac/mach_o_image_segment_reader.h",
"mac/mach_o_image_symbol_table_reader.cc",
"mac/mach_o_image_symbol_table_reader.h",
"mac/module_snapshot_mac.cc",
"mac/module_snapshot_mac.h",
"mac/process_reader_mac.cc",
"mac/process_reader_mac.h",
"mac/process_snapshot_mac.cc",
"mac/process_snapshot_mac.h",
"mac/process_types.cc",
"mac/process_types.h",
"mac/process_types/custom.cc",
"mac/process_types/flavors.h",
"mac/process_types/internal.h",
"mac/process_types/traits.h",
"mac/system_snapshot_mac.cc",
"mac/system_snapshot_mac.h",
"mac/thread_snapshot_mac.cc",
"mac/thread_snapshot_mac.h",
]
}
if (crashpad_is_ios) {
sources += [
"ios/exception_snapshot_ios_intermediate_dump.cc",
"ios/exception_snapshot_ios_intermediate_dump.h",
"ios/intermediate_dump_reader_util.cc",
"ios/intermediate_dump_reader_util.h",
"ios/memory_snapshot_ios_intermediate_dump.cc",
"ios/memory_snapshot_ios_intermediate_dump.h",
"ios/module_snapshot_ios_intermediate_dump.cc",
"ios/module_snapshot_ios_intermediate_dump.h",
"ios/process_snapshot_ios_intermediate_dump.cc",
"ios/process_snapshot_ios_intermediate_dump.h",
"ios/system_snapshot_ios_intermediate_dump.cc",
"ios/system_snapshot_ios_intermediate_dump.h",
"ios/thread_snapshot_ios_intermediate_dump.cc",
"ios/thread_snapshot_ios_intermediate_dump.h",
"mac/cpu_context_mac.cc",
"mac/cpu_context_mac.h",
]
}
if (crashpad_is_linux || crashpad_is_android) {
sources += [
"linux/capture_memory_delegate_linux.cc",
"linux/capture_memory_delegate_linux.h",
"linux/cpu_context_linux.cc",
"linux/cpu_context_linux.h",
"linux/debug_rendezvous.cc",
"linux/debug_rendezvous.h",
"linux/exception_snapshot_linux.cc",
"linux/exception_snapshot_linux.h",
"linux/process_reader_linux.cc",
"linux/process_reader_linux.h",
"linux/process_snapshot_linux.cc",
"linux/process_snapshot_linux.h",
"linux/signal_context.h",
"linux/system_snapshot_linux.cc",
"linux/system_snapshot_linux.h",
"linux/thread_snapshot_linux.cc",
"linux/thread_snapshot_linux.h",
"sanitized/memory_snapshot_sanitized.cc",
"sanitized/memory_snapshot_sanitized.h",
"sanitized/module_snapshot_sanitized.cc",
"sanitized/module_snapshot_sanitized.h",
"sanitized/process_snapshot_sanitized.cc",
"sanitized/process_snapshot_sanitized.h",
"sanitized/sanitization_information.cc",
"sanitized/sanitization_information.h",
"sanitized/thread_snapshot_sanitized.cc",
"sanitized/thread_snapshot_sanitized.h",
]
}
if (crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia ||
crashpad_is_win) {
sources += [
"crashpad_types/crashpad_info_reader.cc",
"crashpad_types/crashpad_info_reader.h",
]
}
if (crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia) {
sources += [
"crashpad_types/image_annotation_reader.cc",
"crashpad_types/image_annotation_reader.h",
"elf/elf_dynamic_array_reader.cc",
"elf/elf_dynamic_array_reader.h",
"elf/elf_image_reader.cc",
"elf/elf_image_reader.h",
"elf/elf_symbol_table_reader.cc",
"elf/elf_symbol_table_reader.h",
"elf/module_snapshot_elf.cc",
"elf/module_snapshot_elf.h",
]
}
if (crashpad_is_win) {
sources += [
"win/capture_memory_delegate_win.cc",
"win/capture_memory_delegate_win.h",
"win/cpu_context_win.cc",
"win/cpu_context_win.h",
"win/exception_snapshot_win.cc",
"win/exception_snapshot_win.h",
"win/memory_map_region_snapshot_win.cc",
"win/memory_map_region_snapshot_win.h",
"win/module_snapshot_win.cc",
"win/module_snapshot_win.h",
"win/pe_image_annotations_reader.cc",
"win/pe_image_annotations_reader.h",
"win/pe_image_reader.cc",
"win/pe_image_reader.h",
"win/pe_image_resource_reader.cc",
"win/pe_image_resource_reader.h",
"win/process_reader_win.cc",
"win/process_reader_win.h",
"win/process_snapshot_win.cc",
"win/process_snapshot_win.h",
"win/process_subrange_reader.cc",
"win/process_subrange_reader.h",
"win/system_snapshot_win.cc",
"win/system_snapshot_win.h",
"win/thread_snapshot_win.cc",
"win/thread_snapshot_win.h",
]
}
if (crashpad_is_fuchsia) {
sources += [
"fuchsia/cpu_context_fuchsia.cc",
"fuchsia/cpu_context_fuchsia.h",
"fuchsia/exception_snapshot_fuchsia.cc",
"fuchsia/exception_snapshot_fuchsia.h",
"fuchsia/memory_map_fuchsia.cc",
"fuchsia/memory_map_fuchsia.h",
"fuchsia/memory_map_region_snapshot_fuchsia.cc",
"fuchsia/memory_map_region_snapshot_fuchsia.h",
"fuchsia/process_reader_fuchsia.cc",
"fuchsia/process_reader_fuchsia.h",
"fuchsia/process_snapshot_fuchsia.cc",
"fuchsia/process_snapshot_fuchsia.h",
"fuchsia/system_snapshot_fuchsia.cc",
"fuchsia/system_snapshot_fuchsia.h",
"fuchsia/thread_snapshot_fuchsia.cc",
"fuchsia/thread_snapshot_fuchsia.h",
]
}
if (current_cpu == "x86" || current_cpu == "x64" ||
(crashpad_is_mac && current_cpu == "mac_universal")) {
sources += [
"x86/cpuid_reader.cc",
"x86/cpuid_reader.h",
]
}
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
public_configs = [ "..:crashpad_config" ]
public_deps = [ ":context" ]
deps = [
"$mini_chromium_source_parent:base",
"../client:common",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../compat",
"../minidump:format",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../util",
]
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
libs = [ "powrprof.lib" ]
}
}
# :context is the only part of snapshot that minidump may depend on.
static_library("context") {
sources = [
"cpu_architecture.h",
"cpu_context.cc",
"cpu_context.h",
]
public_configs = [ "..:crashpad_config" ]
deps = [
"$mini_chromium_source_parent:base",
"../util",
]
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
}
if (crashpad_is_linux) {
crashpad_fuzzer_test("elf_image_reader_fuzzer") {
sources = [ "elf/elf_image_reader_fuzzer.cc" ]
deps = [
":snapshot",
"$mini_chromium_source_parent:base",
"../util:util",
]
seed_corpus = "elf/elf_image_reader_fuzzer_corpus"
}
}
static_library("test_support") {
testonly = true
sources = [
"test/test_cpu_context.cc",
"test/test_cpu_context.h",
"test/test_exception_snapshot.cc",
"test/test_exception_snapshot.h",
"test/test_memory_map_region_snapshot.cc",
"test/test_memory_map_region_snapshot.h",
"test/test_memory_snapshot.cc",
"test/test_memory_snapshot.h",
"test/test_module_snapshot.cc",
"test/test_module_snapshot.h",
"test/test_process_snapshot.cc",
"test/test_process_snapshot.h",
"test/test_system_snapshot.cc",
"test/test_system_snapshot.h",
"test/test_thread_snapshot.cc",
"test/test_thread_snapshot.h",
]
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
public_configs = [ "..:crashpad_config" ]
public_deps = [ ":snapshot" ]
deps = [
"$mini_chromium_source_parent:base",
"../compat",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../util",
]
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
}
config("snapshot_test_link") {
visibility = [ ":*" ]
if (crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia) {
# Theres no way to make the link depend on this file. “inputs” doesnt have
# the intended effect in a config. https://crbug.com/781858,
# https://crbug.com/796187.
inputs = [ "elf/test_exported_symbols.sym" ]
ldflags = [ "-Wl,--dynamic-list," + rebase_path(inputs[0], root_build_dir) ]
}
}
source_set("snapshot_test") {
testonly = true
sources = [
"cpu_context_test.cc",
"memory_snapshot_test.cc",
"minidump/process_snapshot_minidump_test.cc",
]
if (crashpad_is_mac) {
sources += [
"mac/cpu_context_mac_test.cc",
"mac/mach_o_image_annotations_reader_test.cc",
"mac/mach_o_image_reader_test.cc",
"mac/mach_o_image_segment_reader_test.cc",
"mac/process_reader_mac_test.cc",
"mac/process_types_test.cc",
"mac/system_snapshot_mac_test.cc",
]
}
if (crashpad_is_ios) {
sources += [
"ios/memory_snapshot_ios_intermediate_dump_test.cc",
"ios/process_snapshot_ios_intermediate_dump_test.cc",
"mac/cpu_context_mac_test.cc",
]
}
if (crashpad_is_linux || crashpad_is_android) {
sources += [
"linux/debug_rendezvous_test.cc",
"linux/exception_snapshot_linux_test.cc",
"linux/process_reader_linux_test.cc",
"linux/system_snapshot_linux_test.cc",
"linux/test_modules.cc",
"linux/test_modules.h",
"sanitized/process_snapshot_sanitized_test.cc",
"sanitized/sanitization_information_test.cc",
]
} else if (!crashpad_is_ios) {
sources += [ "crashpad_info_client_options_test.cc" ]
}
if (crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia ||
crashpad_is_win) {
sources += [ "crashpad_types/crashpad_info_reader_test.cc" ]
}
if (crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia) {
sources += [
"crashpad_types/image_annotation_reader_test.cc",
"elf/elf_image_reader_test.cc",
"elf/elf_image_reader_test_note.S",
]
}
if (crashpad_is_win) {
sources += [
"win/cpu_context_win_test.cc",
"win/exception_snapshot_win_test.cc",
"win/extra_memory_ranges_test.cc",
"win/module_snapshot_win_test.cc",
"win/pe_image_reader_test.cc",
"win/process_reader_win_test.cc",
"win/process_snapshot_win_test.cc",
"win/system_snapshot_win_test.cc",
]
} else if (!crashpad_is_fuchsia) {
# Timezones are currently non-functional on Fuchsia:
# https://fuchsia.googlesource.com/zircon/+/master/third_party/ulib/musl/src/time/__tz.c#9
# https://crashpad.chromium.org/bug/196. Relevant upstream bugs are ZX-337
# and ZX-1731.
sources += [ "posix/timezone_test.cc" ]
}
if (crashpad_is_fuchsia) {
sources += [
"fuchsia/process_reader_fuchsia_test.cc",
"fuchsia/process_snapshot_fuchsia_test.cc",
]
}
# public_configs isnt quite right. snapshot_test_link sets ldflags, and
# whats really needed is a way to push ldflags to dependent targets that
# produce linker output. Luckily in this case, all dependents do produce
# linker output. https://crbug.com/796183.
public_configs = [ ":snapshot_test_link" ]
deps = [
":test_support",
"$mini_chromium_source_parent:base",
"../client:common",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../compat",
"../minidump:format",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../test",
"../third_party/googletest:googlemock",
Update gtest to e3f0319d89f4cbf32993de595d984183b1a9fc57 I’m most interested in picking up 1b3eb6ef3462, “Explicitly define copy constructors used in googletest tests.” This also reorganizes files and rewrites text to refer to this project as Google Test and googletest (and Google Mock and googlemock), as it prefers to be known. Some filenames are left at gtest_* following the precedent set by gtest itself. For example, #include "gtest/gtest.h" is still used, so #include "test/gtest_death.h" is retained too. gtest_all_test OutputFileHelpersTest.GetCurrentExecutableName hard-codes the expected executable name as gtest_all_test among other options that do not include googletest_all_test, so test executables retain their names as well. fb19f57880f6 Add GTEST_BRIEF option 3549237957a1 Ensure that gtest/gmock pkgconfig requirements specify version 189299e957bb Merge branch 'master' into quiet-flag 5504ded3ab5c Fix a typo in .travis.yml 6ed4e7168f54 Replace the last instance of `throw()` with `noexcept`. NFC 879fd9b45299 Remove duplicate codes existed in get-nprocessors.sh 644f3a992c28 gtest-unittest-api_test - fix warning in clang build 0b6d567619fe Remove redundant .c_str() be3ac45cf673 fix signed/unsigned comparison issue (on OpenBSD) b51a49e0cb82 Merge pull request #2773 from Quuxplusone:replace-noexcept c2032090f373 Merge pull request #2772 from Quuxplusone:travis 4fe5ac53337e Merge pull request #2756 from Conan-Kudo:fix-pkgconfig-reqs 373d72b6986f Googletest export 4c8e6a9fe1c8 Merge pull request #2810 from ptahmose:master 71d5df6c6b67 Merge pull request #2802 from e-i-n-s:fix_clang_warning dcc92d0ab6c4 Merge pull request #2805 from pepsiman:patch-1 4f002f1e236c VariadicMatcher needs a non-defaulted move constructor for compile-time performance 9d580ea80592 Enable protobuf printing for open-source proto messages 766ac2e1a413 Remove all uses of GTEST_DISALLOW_{MOVE_,}ASSIGN_ 11b3cec177b1 Fix a -Wdeprecated warning 01c0ff5e2373 Fix a -Wdeprecated warning c7d8ec72cc4b Fix a -Wdeprecated warning 1b066f4edfd5 Add -Wdeprecated to the build configuration 4bab55dc54b4 Removed a typo in README.md a67701056425 Googletest export fb5d9b66c5b0 Googletest export 1b3eb6ef3462 Googletest export b0e53e2d64db Merge pull request #2797 from Jyun-Neng:master d7ca9af0049e Googletest export 955552518b4e Googletest export ef25d27d4604 Merge pull request #2815 from Quuxplusone:simple 129329787429 Googletest export b99b421d8d68 Merge pull request #2818 from inazarenko:master 472cd8fd8b1c Merge pull request #2818 from inazarenko:master 3cfb4117f7e5 Googletest export 0eea2e9fc634 Googletest export a9f6c1ed1401 Googletest export 1a9c3e441407 Merge pull request #2830 from keshavgbpecdelhi:patch-1 e589a3371705 Merge pull request #2751 from calumr:quiet-flag Change-Id: Id788a27aa884ef68a21bae6c178cd456f5f6f2b0 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2186009 Reviewed-by: Joshua Peraza <jperaza@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-05-06 20:39:19 -04:00
"../third_party/googletest:googletest",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../util",
]
if (crashpad_is_ios) {
deps += [
":snapshot_test_ios_data",
"../minidump",
]
}
data_deps = [
":crashpad_snapshot_test_module",
":crashpad_snapshot_test_module_large",
":crashpad_snapshot_test_module_small",
]
if (crashpad_is_mac) {
frameworks = [ "OpenCL.framework" ]
data_deps += [
":crashpad_snapshot_test_module_crashy_initializer",
":crashpad_snapshot_test_no_op",
]
}
if (crashpad_is_linux || crashpad_is_android) {
libs = [ "dl" ]
}
if ((crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia) &&
target_cpu != "mipsel" && target_cpu != "mips64el") {
data_deps += [ ":crashpad_snapshot_test_both_dt_hash_styles" ]
}
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
data_deps += [
":crashpad_snapshot_test_annotations",
":crashpad_snapshot_test_crashing_child",
":crashpad_snapshot_test_dump_without_crashing",
":crashpad_snapshot_test_extra_memory_ranges",
":crashpad_snapshot_test_image_reader",
":crashpad_snapshot_test_image_reader_module",
]
}
}
bundle_data("snapshot_test_ios_data") {
testonly = true
sources = [
"ios/testdata/crash-1fa088dda0adb41459d063078a0f384a0bb8eefa",
"ios/testdata/crash-5726011582644224",
"ios/testdata/crash-6605504629637120",
]
outputs = [ "{{bundle_resources_dir}}/crashpad_test_data/" +
"{{source_root_relative_dir}}/{{source_file_part}}" ]
}
crashpad_loadable_module("crashpad_snapshot_test_module") {
testonly = true
sources = [ "crashpad_info_client_options_test_module.cc" ]
deps = [
"$mini_chromium_source_parent:base",
"../client",
]
if (crashpad_is_in_fuchsia) {
# TODO(fxbug.dev/108368): Remove this once the underlying issue is addressed.
exclude_toolchain_tags = [ "hwasan" ]
}
}
crashpad_loadable_module("crashpad_snapshot_test_module_large") {
testonly = true
sources = [ "crashpad_info_size_test_module.cc" ]
deps = []
if (crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia) {
sources += [ "crashpad_info_size_test_note.S" ]
deps += [ "../util" ]
}
defines = [ "CRASHPAD_INFO_SIZE_TEST_MODULE_LARGE" ]
deps += [ "$mini_chromium_source_parent:base" ]
if (crashpad_is_in_fuchsia) {
# TODO(fxbug.dev/108368): Remove this once the underlying issue is addressed.
exclude_toolchain_tags = [ "hwasan" ]
}
}
crashpad_loadable_module("crashpad_snapshot_test_module_small") {
testonly = true
sources = [ "crashpad_info_size_test_module.cc" ]
deps = []
if (crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia) {
sources += [ "crashpad_info_size_test_note.S" ]
deps += [ "../util" ]
}
defines = [ "CRASHPAD_INFO_SIZE_TEST_MODULE_SMALL" ]
deps += [ "$mini_chromium_source_parent:base" ]
if (crashpad_is_in_fuchsia) {
# TODO(fxbug.dev/108368): Remove this once the underlying issue is addressed.
exclude_toolchain_tags = [ "hwasan" ]
}
}
if ((crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia) &&
target_cpu != "mipsel" && target_cpu != "mips64el") {
crashpad_loadable_module("crashpad_snapshot_test_both_dt_hash_styles") {
Read either DT_HASH or DT_GNU_HASH to determine the size of DT_SYMTAB Without the section headers for the symbol table, there's no direct way to calculate the number of entries in the table. DT_HASH and DT_GNU_HASH are auxiliary tables that are designed to make symbol lookup faster. DT_HASH is the original and is theoretically mandatory. DT_GNU_HASH is the new-and-improved, but is more complex. In practice, however, an Android build (at least vs. API 16) has only DT_HASH, and not DT_GNU_HASH, and a Fuchsia build has only DT_GNU_HASH but not DT_HASH. So, both are tried. This change does not actually use the data in these tables to improve the speed of symbol lookup, but instead only uses them to correctly terminate the linear search. DT_HASH contains the total number of symbols in the symbol table fairly directly because there is an entry for each symbol table entry in the hash table, so the number is the same. DT_GNU_HASH regrettably does not. Instead, it's necessary to walk the buckets and chain structure to find the largest entry. DT_GNU_HASH doesn't appear in any "real" documentation that I'm aware of, other than the binutils code (at least as far as I know). Some more-and-less-useful references: - https://flapenguin.me/2017/04/24/elf-lookup-dt-hash/ - https://flapenguin.me/2017/05/10/elf-lookup-dt-gnu-hash/ - http://deroko.phearless.org/dt_gnu_hash.txt - https://sourceware.org/ml/binutils/2006-10/msg00377.html Change-Id: I7cfc4372f29efc37446f0931d22a1f790e44076f Bug: crashpad:213, crashpad:196 Reviewed-on: https://chromium-review.googlesource.com/876879 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-01-30 14:30:50 -08:00
testonly = true
sources = [ "hash_types_test.cc" ]
Read either DT_HASH or DT_GNU_HASH to determine the size of DT_SYMTAB Without the section headers for the symbol table, there's no direct way to calculate the number of entries in the table. DT_HASH and DT_GNU_HASH are auxiliary tables that are designed to make symbol lookup faster. DT_HASH is the original and is theoretically mandatory. DT_GNU_HASH is the new-and-improved, but is more complex. In practice, however, an Android build (at least vs. API 16) has only DT_HASH, and not DT_GNU_HASH, and a Fuchsia build has only DT_GNU_HASH but not DT_HASH. So, both are tried. This change does not actually use the data in these tables to improve the speed of symbol lookup, but instead only uses them to correctly terminate the linear search. DT_HASH contains the total number of symbols in the symbol table fairly directly because there is an entry for each symbol table entry in the hash table, so the number is the same. DT_GNU_HASH regrettably does not. Instead, it's necessary to walk the buckets and chain structure to find the largest entry. DT_GNU_HASH doesn't appear in any "real" documentation that I'm aware of, other than the binutils code (at least as far as I know). Some more-and-less-useful references: - https://flapenguin.me/2017/04/24/elf-lookup-dt-hash/ - https://flapenguin.me/2017/05/10/elf-lookup-dt-gnu-hash/ - http://deroko.phearless.org/dt_gnu_hash.txt - https://sourceware.org/ml/binutils/2006-10/msg00377.html Change-Id: I7cfc4372f29efc37446f0931d22a1f790e44076f Bug: crashpad:213, crashpad:196 Reviewed-on: https://chromium-review.googlesource.com/876879 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-01-30 14:30:50 -08:00
# This makes `ld` emit both .hash and .gnu.hash sections.
ldflags = [ "-Wl,--hash-style=both" ]
if (crashpad_is_in_fuchsia) {
# TODO(fxbug.dev/108368): Remove this once the underlying issue is addressed.
exclude_toolchain_tags = [ "hwasan" ]
}
Read either DT_HASH or DT_GNU_HASH to determine the size of DT_SYMTAB Without the section headers for the symbol table, there's no direct way to calculate the number of entries in the table. DT_HASH and DT_GNU_HASH are auxiliary tables that are designed to make symbol lookup faster. DT_HASH is the original and is theoretically mandatory. DT_GNU_HASH is the new-and-improved, but is more complex. In practice, however, an Android build (at least vs. API 16) has only DT_HASH, and not DT_GNU_HASH, and a Fuchsia build has only DT_GNU_HASH but not DT_HASH. So, both are tried. This change does not actually use the data in these tables to improve the speed of symbol lookup, but instead only uses them to correctly terminate the linear search. DT_HASH contains the total number of symbols in the symbol table fairly directly because there is an entry for each symbol table entry in the hash table, so the number is the same. DT_GNU_HASH regrettably does not. Instead, it's necessary to walk the buckets and chain structure to find the largest entry. DT_GNU_HASH doesn't appear in any "real" documentation that I'm aware of, other than the binutils code (at least as far as I know). Some more-and-less-useful references: - https://flapenguin.me/2017/04/24/elf-lookup-dt-hash/ - https://flapenguin.me/2017/05/10/elf-lookup-dt-gnu-hash/ - http://deroko.phearless.org/dt_gnu_hash.txt - https://sourceware.org/ml/binutils/2006-10/msg00377.html Change-Id: I7cfc4372f29efc37446f0931d22a1f790e44076f Bug: crashpad:213, crashpad:196 Reviewed-on: https://chromium-review.googlesource.com/876879 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-01-30 14:30:50 -08:00
}
}
if (crashpad_is_mac || crashpad_is_ios) {
crashpad_loadable_module("crashpad_snapshot_test_module_crashy_initializer") {
testonly = true
sources = [
"mac/mach_o_image_annotations_reader_test_module_crashy_initializer.cc",
]
}
crashpad_executable("crashpad_snapshot_test_no_op") {
testonly = true
sources = [ "mac/mach_o_image_annotations_reader_test_no_op.cc" ]
}
}
if (crashpad_is_win) {
crashpad_executable("crashpad_snapshot_test_annotations") {
testonly = true
sources = [ "win/crashpad_snapshot_test_annotations.cc" ]
deps = [
"$mini_chromium_source_parent:base",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../client",
"../compat",
]
}
crashpad_executable("crashpad_snapshot_test_crashing_child") {
testonly = true
sources = [ "win/crashpad_snapshot_test_crashing_child.cc" ]
deps = [
"$mini_chromium_source_parent:base",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../client",
"../compat",
"../util",
]
}
crashpad_executable("crashpad_snapshot_test_dump_without_crashing") {
testonly = true
sources = [ "win/crashpad_snapshot_test_dump_without_crashing.cc" ]
deps = [
"$mini_chromium_source_parent:base",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../client",
"../compat",
"../util",
]
}
crashpad_executable("crashpad_snapshot_test_extra_memory_ranges") {
testonly = true
sources = [ "win/crashpad_snapshot_test_extra_memory_ranges.cc" ]
deps = [
"$mini_chromium_source_parent:base",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../client",
"../compat",
]
}
crashpad_executable("crashpad_snapshot_test_image_reader") {
testonly = true
sources = [ "win/crashpad_snapshot_test_image_reader.cc" ]
deps = [
"$mini_chromium_source_parent:base",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../client",
"../compat",
"../util",
]
if (crashpad_is_in_chromium) {
if (symbol_level == 0) {
# The tests that use this executable rely on at least minimal debug
# info.
remove_configs = [ "//build/config/compiler:default_symbols" ]
configs = [ "//build/config/compiler:minimal_symbols" ]
}
}
}
crashpad_loadable_module("crashpad_snapshot_test_image_reader_module") {
testonly = true
sources = [ "win/crashpad_snapshot_test_image_reader_module.cc" ]
deps = [
"$mini_chromium_source_parent:base",
"../client",
]
if (crashpad_is_in_chromium) {
if (symbol_level == 0) {
# The tests that use this module rely on at least minimal debug info.
remove_configs = [ "//build/config/compiler:default_symbols" ]
configs = [ "//build/config/compiler:minimal_symbols" ]
}
}
}
}