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:
Joshua Peraza 2018-03-28 08:37:22 -07:00
parent 58e4bbecc2
commit 7bd613e558
3 changed files with 13 additions and 7 deletions

View File

@ -47,7 +47,7 @@
#include "util/win/xp_compat.h"
#elif defined(OS_FUCHSIA)
#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"
#endif // OS_MACOSX
@ -201,7 +201,7 @@ int GenerateDumpMain(int argc, char* argv[]) {
if (!process_snapshot.Initialize(ZX_HANDLE_INVALID)) {
return EXIT_FAILURE;
}
#elif defined(OS_LINUX)
#elif defined(OS_LINUX) || defined(OS_ANDROID)
// TODO(jperaza): https://crashpad.chromium.org/bug/30.
ProcessSnapshotLinux process_snapshot;
if (!process_snapshot.Initialize(nullptr)) {

View File

@ -17,7 +17,7 @@ import("../build/crashpad_buildconfig.gni")
declare_args() {
if (crashpad_is_linux) {
# 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")
}
if (crashpad_is_linux) {
if (enable_http_transport_libcurl) {
if (crashpad_is_linux || crashpad_is_android) {
if (crashpad_is_linux && crashpad_enable_http_transport_libcurl) {
sources += [ "net/http_transport_libcurl.cc" ]
} else {
sources += [ "net/http_transport_none.cc" ]
@ -420,7 +420,7 @@ static_library("util") {
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" ]
}
@ -497,7 +497,7 @@ source_set("util_test") {
}
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
# (libcurl isnt in eithers SDK) and a solution to
# http_transport_test_server.py, because Python isnt available on either.

View File

@ -177,6 +177,7 @@
'net/http_transport.h',
'net/http_transport_libcurl.cc',
'net/http_transport_mac.mm',
'net/http_transport_none.cc',
'net/http_transport_win.cc',
'net/url.cc',
'net/url.h',
@ -393,6 +394,11 @@
'net/http_transport_libcurl.cc',
],
}],
['OS!="android"', {
'sources!': [
'net/http_transport_none.cc',
],
}],
['OS!="linux" and OS!="android"', {
'sources/': [
['exclude', '^process/'],