mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
linux: prefix args with crashpad and build tools on android
1. Prefix enable_http_transport_libcurl with crashpad for use in chromium .gn files. 2. Make tools build on Android using http_transport_none.cc Bug: crashpad:30 Change-Id: I0a9878fe9f5b8fbc13a52f93df273fb1de8160f3 Reviewed-on: https://chromium-review.googlesource.com/984038 Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
58e4bbecc2
commit
7bd613e558
@ -47,7 +47,7 @@
|
|||||||
#include "util/win/xp_compat.h"
|
#include "util/win/xp_compat.h"
|
||||||
#elif defined(OS_FUCHSIA)
|
#elif defined(OS_FUCHSIA)
|
||||||
#include "snapshot/fuchsia/process_snapshot_fuchsia.h"
|
#include "snapshot/fuchsia/process_snapshot_fuchsia.h"
|
||||||
#elif defined(OS_LINUX)
|
#elif defined(OS_LINUX) || defined(OS_ANDROID)
|
||||||
#include "snapshot/linux/process_snapshot_linux.h"
|
#include "snapshot/linux/process_snapshot_linux.h"
|
||||||
#endif // OS_MACOSX
|
#endif // OS_MACOSX
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ int GenerateDumpMain(int argc, char* argv[]) {
|
|||||||
if (!process_snapshot.Initialize(ZX_HANDLE_INVALID)) {
|
if (!process_snapshot.Initialize(ZX_HANDLE_INVALID)) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
#elif defined(OS_LINUX)
|
#elif defined(OS_LINUX) || defined(OS_ANDROID)
|
||||||
// TODO(jperaza): https://crashpad.chromium.org/bug/30.
|
// TODO(jperaza): https://crashpad.chromium.org/bug/30.
|
||||||
ProcessSnapshotLinux process_snapshot;
|
ProcessSnapshotLinux process_snapshot;
|
||||||
if (!process_snapshot.Initialize(nullptr)) {
|
if (!process_snapshot.Initialize(nullptr)) {
|
||||||
|
@ -17,7 +17,7 @@ import("../build/crashpad_buildconfig.gni")
|
|||||||
declare_args() {
|
declare_args() {
|
||||||
if (crashpad_is_linux) {
|
if (crashpad_is_linux) {
|
||||||
# Whether the libcurl-based HTTPTransport implementation should be built.
|
# Whether the libcurl-based HTTPTransport implementation should be built.
|
||||||
enable_http_transport_libcurl = true
|
crashpad_enable_http_transport_libcurl = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,8 +251,8 @@ static_library("util") {
|
|||||||
sources += get_target_outputs(":mig")
|
sources += get_target_outputs(":mig")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (crashpad_is_linux) {
|
if (crashpad_is_linux || crashpad_is_android) {
|
||||||
if (enable_http_transport_libcurl) {
|
if (crashpad_is_linux && crashpad_enable_http_transport_libcurl) {
|
||||||
sources += [ "net/http_transport_libcurl.cc" ]
|
sources += [ "net/http_transport_libcurl.cc" ]
|
||||||
} else {
|
} else {
|
||||||
sources += [ "net/http_transport_none.cc" ]
|
sources += [ "net/http_transport_none.cc" ]
|
||||||
@ -420,7 +420,7 @@ static_library("util") {
|
|||||||
include_dirs += [ "$root_build_dir/gen" ]
|
include_dirs += [ "$root_build_dir/gen" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (crashpad_is_linux && enable_http_transport_libcurl) {
|
if (crashpad_is_linux && crashpad_enable_http_transport_libcurl) {
|
||||||
libs = [ "curl" ]
|
libs = [ "curl" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -497,7 +497,7 @@ source_set("util_test") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!crashpad_is_android && !crashpad_is_fuchsia &&
|
if (!crashpad_is_android && !crashpad_is_fuchsia &&
|
||||||
(!crashpad_is_linux || enable_http_transport_libcurl)) {
|
(!crashpad_is_linux || crashpad_enable_http_transport_libcurl)) {
|
||||||
# Android and Fuchsia will each require an HTTPTransport implementation
|
# Android and Fuchsia will each require an HTTPTransport implementation
|
||||||
# (libcurl isn’t in either’s SDK) and a solution to
|
# (libcurl isn’t in either’s SDK) and a solution to
|
||||||
# http_transport_test_server.py, because Python isn’t available on either.
|
# http_transport_test_server.py, because Python isn’t available on either.
|
||||||
|
@ -177,6 +177,7 @@
|
|||||||
'net/http_transport.h',
|
'net/http_transport.h',
|
||||||
'net/http_transport_libcurl.cc',
|
'net/http_transport_libcurl.cc',
|
||||||
'net/http_transport_mac.mm',
|
'net/http_transport_mac.mm',
|
||||||
|
'net/http_transport_none.cc',
|
||||||
'net/http_transport_win.cc',
|
'net/http_transport_win.cc',
|
||||||
'net/url.cc',
|
'net/url.cc',
|
||||||
'net/url.h',
|
'net/url.h',
|
||||||
@ -393,6 +394,11 @@
|
|||||||
'net/http_transport_libcurl.cc',
|
'net/http_transport_libcurl.cc',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
['OS!="android"', {
|
||||||
|
'sources!': [
|
||||||
|
'net/http_transport_none.cc',
|
||||||
|
],
|
||||||
|
}],
|
||||||
['OS!="linux" and OS!="android"', {
|
['OS!="linux" and OS!="android"', {
|
||||||
'sources/': [
|
'sources/': [
|
||||||
['exclude', '^process/'],
|
['exclude', '^process/'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user