gn: Move sources out to explicit blocks

This avoids relying on set_sources_assignment_filter, and so gets closer
to a correct set of files to build on Fuchsia.

Bug: crashpad:79, crashpad:196
Change-Id: Ib7daa5137935113c6645b72eb1dedd943a9db96e
Reviewed-on: https://chromium-review.googlesource.com/797672
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
This commit is contained in:
Scott Graham 2017-11-29 11:59:18 -08:00 committed by Commit Bot
parent 593ede52e0
commit 9465fc72ad
3 changed files with 150 additions and 113 deletions

View File

@ -22,11 +22,7 @@ static_library("client") {
"annotation_list.h",
"crash_report_database.cc",
"crash_report_database.h",
"crash_report_database_mac.mm",
"crash_report_database_win.cc",
"crashpad_client.h",
"crashpad_client_mac.cc",
"crashpad_client_win.cc",
"crashpad_info.cc",
"crashpad_info.h",
"prune_crash_reports.cc",
@ -36,15 +32,24 @@ static_library("client") {
"simple_address_range_bag.h",
"simple_string_dictionary.h",
"simulate_crash.h",
"simulate_crash_mac.cc",
"simulate_crash_mac.h",
"simulate_crash_win.h",
]
if (is_mac) {
sources += [
"capture_context_mac.S",
"capture_context_mac.h",
"crash_report_database_mac.mm",
"crashpad_client_mac.cc",
"simulate_crash_mac.cc",
"simulate_crash_mac.h",
]
}
if (is_win) {
sources += [
"crash_report_database_win.cc",
"crashpad_client_win.cc",
"simulate_crash_win.h",
]
}

View File

@ -29,6 +29,32 @@ static_library("snapshot") {
"exception_snapshot.h",
"handle_snapshot.cc",
"handle_snapshot.h",
"memory_snapshot.h",
"minidump/minidump_annotation_reader.cc",
"minidump/minidump_annotation_reader.h",
"minidump/minidump_simple_string_dictionary_reader.cc",
"minidump/minidump_simple_string_dictionary_reader.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",
"module_snapshot.h",
"posix/timezone.cc",
"posix/timezone.h",
"process_snapshot.h",
"snapshot_constants.h",
"system_snapshot.h",
"thread_snapshot.h",
"unloaded_module_snapshot.cc",
"unloaded_module_snapshot.h",
]
if (is_mac) {
sources += [
"mac/cpu_context_mac.cc",
"mac/cpu_context_mac.h",
"mac/exception_snapshot_mac.cc",
@ -66,28 +92,11 @@ static_library("snapshot") {
"mac/system_snapshot_mac.h",
"mac/thread_snapshot_mac.cc",
"mac/thread_snapshot_mac.h",
"memory_snapshot.h",
"minidump/minidump_annotation_reader.cc",
"minidump/minidump_annotation_reader.h",
"minidump/minidump_simple_string_dictionary_reader.cc",
"minidump/minidump_simple_string_dictionary_reader.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",
"module_snapshot.h",
"posix/timezone.cc",
"posix/timezone.h",
"process_snapshot.h",
"snapshot_constants.h",
"system_snapshot.h",
"thread_snapshot.h",
"unloaded_module_snapshot.cc",
"unloaded_module_snapshot.h",
]
}
if (is_win) {
sources += [
"win/capture_memory_delegate_win.cc",
"win/capture_memory_delegate_win.h",
"win/cpu_context_win.cc",
@ -117,6 +126,7 @@ static_library("snapshot") {
"win/thread_snapshot_win.cc",
"win/thread_snapshot_win.h",
]
}
if (target_cpu == "x86" || target_cpu == "x64") {
sources += [
@ -208,6 +218,11 @@ source_set("snapshot_test") {
sources = [
"cpu_context_test.cc",
"crashpad_info_client_options_test.cc",
"minidump/process_snapshot_minidump_test.cc",
]
if (is_mac) {
sources += [
"mac/cpu_context_mac_test.cc",
"mac/mach_o_image_annotations_reader_test.cc",
"mac/mach_o_image_reader_test.cc",
@ -215,7 +230,12 @@ source_set("snapshot_test") {
"mac/process_reader_test.cc",
"mac/process_types_test.cc",
"mac/system_snapshot_mac_test.cc",
"minidump/process_snapshot_minidump_test.cc",
]
}
if (is_win) {
sources += [
"api/module_annotations_win_test.cc",
"win/cpu_context_win_test.cc",
"win/exception_snapshot_win_test.cc",
"win/extra_memory_ranges_test.cc",
@ -225,9 +245,6 @@ source_set("snapshot_test") {
"win/process_snapshot_win_test.cc",
"win/system_snapshot_win_test.cc",
]
if (is_win) {
sources += [ "api/module_annotations_win_test.cc" ]
} else {
sources += [ "posix/timezone_test.cc" ]
}

View File

@ -29,14 +29,6 @@ static_library("test") {
"gtest_disabled.h",
"hex_string.cc",
"hex_string.h",
"mac/dyld.cc",
"mac/dyld.h",
"mac/exception_swallower.cc",
"mac/exception_swallower.h",
"mac/mach_errors.cc",
"mac/mach_errors.h",
"mac/mach_multiprocess.cc",
"mac/mach_multiprocess.h",
"main_arguments.cc",
"main_arguments.h",
"multiprocess.h",
@ -52,6 +44,25 @@ static_library("test") {
"scoped_temp_dir_win.cc",
"test_paths.cc",
"test_paths.h",
]
if (is_mac) {
libs = [ "bsm" ]
deps += [ "//third_party/crashpad/crashpad/handler" ]
sources += [
"mac/dyld.cc",
"mac/dyld.h",
"mac/exception_swallower.cc",
"mac/exception_swallower.h",
"mac/mach_errors.cc",
"mac/mach_errors.h",
"mac/mach_multiprocess.cc",
"mac/mach_multiprocess.h",
]
}
if (is_win) {
sources += [
"win/child_launcher.cc",
"win/child_launcher.h",
"win/win_child_process.cc",
@ -61,6 +72,7 @@ static_library("test") {
"win/win_multiprocess_with_temp_dir.cc",
"win/win_multiprocess_with_temp_dir.h",
]
}
public_configs = [ "..:crashpad_config" ]
@ -77,11 +89,6 @@ static_library("test") {
"//base",
"//testing/gtest",
]
if (is_mac) {
libs = [ "bsm" ]
deps += [ "//third_party/crashpad/crashpad/handler" ]
}
}
source_set("test_test") {
@ -89,16 +96,24 @@ source_set("test_test") {
sources = [
"hex_string_test.cc",
"mac/mach_multiprocess_test.cc",
"main_arguments_test.cc",
"multiprocess_exec_test.cc",
"scoped_temp_dir_test.cc",
"test_paths_test.cc",
]
if (is_mac) {
sources += [ "mac/mach_multiprocess_test.cc" ]
}
if (is_win) {
sources += [
"win/win_child_process_test.cc",
"win/win_multiprocess_test.cc",
]
}
if (!is_win) {
if (is_posix) {
sources += [ "multiprocess_posix_test.cc" ]
}