gn win: Get main test binaries building

- default to subsystem:console
- don't build posix/timezone.*
- add some missing libs

This gets all the main binaries building and running. Most configs pass,
but there's some offsets that seem different in some builds; need to
investigate more. Additionally, the binaries used by end_to_end_test.py
aren't yet built, so that script fails.

Includes mini_chromium roll to 46eeaf9:
46eea49 gn win: Add debug info and pdb to cc/cxx
902a29f gn win: Various fixes towards making GN build work

Bug: crashpad:79
Change-Id: Ie56a469b84bed7b0330172cec9f1a8aeb95f702e
Reviewed-on: https://chromium-review.googlesource.com/902403
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Scott Graham 2018-02-06 10:57:23 -08:00 committed by Commit Bot
parent a8ecdbc973
commit 14dbd3531d
6 changed files with 37 additions and 13 deletions

2
DEPS
View File

@ -28,7 +28,7 @@ deps = {
'5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f', '5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f',
'crashpad/third_party/mini_chromium/mini_chromium': 'crashpad/third_party/mini_chromium/mini_chromium':
Var('chromium_git') + '/chromium/mini_chromium@' + Var('chromium_git') + '/chromium/mini_chromium@' +
'3b953302848580cdf23b50402befc0ae09d03ff9', '46eea49ed02ecad04a296794ab25fbdd85202558',
'crashpad/third_party/zlib/zlib': 'crashpad/third_party/zlib/zlib':
Var('chromium_git') + '/chromium/src/third_party/zlib@' + Var('chromium_git') + '/chromium/src/third_party/zlib@' +
'13dc246a58e4b72104d35f9b1809af95221ebda7', '13dc246a58e4b72104d35f9b1809af95221ebda7',

View File

@ -54,8 +54,10 @@ _default_configs = [
] ]
_default_executable_configs = _default_executable_configs =
_default_configs + _default_configs + [
[ "//third_party/mini_chromium/mini_chromium/build:executable" ] "//third_party/mini_chromium/mini_chromium/build:executable",
"//third_party/mini_chromium/mini_chromium/build:win_console",
]
set_defaults("source_set") { set_defaults("source_set") {
configs = _default_configs configs = _default_configs

View File

@ -147,8 +147,15 @@ executable("crashpad_handler") {
} }
if (crashpad_is_win) { if (crashpad_is_win) {
configs -= [ "//build/config/win:console" ] if (crashpad_is_in_chromium) {
configs += [ "//build/config/win:windowed" ] configs -= [ "//build/config/win:console" ]
configs += [ "//build/config/win:windowed" ]
} else {
configs -=
[ "//third_party/mini_chromium/mini_chromium/build:win_console" ]
configs +=
[ "//third_party/mini_chromium/mini_chromium/build:win_windowed" ]
}
} }
} }

View File

@ -47,8 +47,6 @@ static_library("snapshot") {
"minidump/process_snapshot_minidump.cc", "minidump/process_snapshot_minidump.cc",
"minidump/process_snapshot_minidump.h", "minidump/process_snapshot_minidump.h",
"module_snapshot.h", "module_snapshot.h",
"posix/timezone.cc",
"posix/timezone.h",
"process_snapshot.h", "process_snapshot.h",
"snapshot_constants.h", "snapshot_constants.h",
"system_snapshot.h", "system_snapshot.h",
@ -57,6 +55,13 @@ static_library("snapshot") {
"unloaded_module_snapshot.h", "unloaded_module_snapshot.h",
] ]
if (crashpad_is_posix) {
sources += [
"posix/timezone.cc",
"posix/timezone.h",
]
}
if (crashpad_is_mac) { if (crashpad_is_mac) {
sources += [ sources += [
"mac/cpu_context_mac.cc", "mac/cpu_context_mac.cc",

View File

@ -96,7 +96,6 @@ static_library("test") {
if (crashpad_is_fuchsia) { if (crashpad_is_fuchsia) {
sources += [ "multiprocess_exec_fuchsia.cc" ] sources += [ "multiprocess_exec_fuchsia.cc" ]
libs = [ "launchpad" ]
} }
public_configs = [ "..:crashpad_config" ] public_configs = [ "..:crashpad_config" ]
@ -121,6 +120,14 @@ static_library("test") {
"../snapshot", "../snapshot",
] ]
} }
if (crashpad_is_win) {
libs = [ "shell32.lib" ]
}
if (crashpad_is_fuchsia) {
libs = [ "launchpad" ]
}
} }
source_set("test_test") { source_set("test_test") {

View File

@ -407,11 +407,11 @@ static_library("util") {
} }
if (crashpad_is_win) { if (crashpad_is_win) {
cflags = [ libs = [
"/wd4201", # nonstandard extension used : nameless struct/union. "mincore.lib",
"/wd4577", # 'noexcept' used with no exception handling mode specified. "user32.lib",
"winhttp.lib",
] ]
libs = [ "winhttp.lib" ]
if (current_cpu == "x86") { if (current_cpu == "x86") {
asmflags = [ "/safeseh" ] asmflags = [ "/safeseh" ]
@ -568,7 +568,10 @@ source_set("util_test") {
} }
if (crashpad_is_win) { if (crashpad_is_win) {
libs = [ "rpcrt4.lib" ] libs = [
"rpcrt4.lib",
"dbghelp.lib",
]
data_deps = [ data_deps = [
":crashpad_util_test_process_info_test_child", ":crashpad_util_test_process_info_test_child",
":crashpad_util_test_safe_terminate_process_test_child", ":crashpad_util_test_safe_terminate_process_test_child",