1174 Commits

Author SHA1 Message Date
Mostyn Bramley-Moore
26cd6138af [jumbo] add some missing include guards
Change-Id: I062c853d65c3e89a61920d790d9bc5c993b46fcd
Reviewed-on: https://chromium-review.googlesource.com/884581
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2018-01-24 22:45:01 +00:00
Scott Graham
9d7a5b10ec gn: Fix relative path to base for in-Fuchsia build
Change from an absolute path to a relative one so that the location of
Crashpad and mini_chromium don't matter, as long as they're in the same
relative locations.

Bug: crashpad:196
Change-Id: I20380b02f211ca0ac04cffaab7d7510d2c8f35ea
Reviewed-on: https://chromium-review.googlesource.com/884370
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-01-24 20:35:55 +00:00
Scott Graham
7e7193d5f1 fuchsia: Update expected mini_chromium location for in-Fuchsia build
The initial plan was to have crashpad and mini_chromium be siblings in
the Fuchsia tree, but the Fuchsia team sensibly preferred to nest
mini_chromium inside Crashpad
https://fuchsia-review.googlesource.com/c/garnet/+/115120, so update the
expected location to match. Conveniently this is where mini_chromium
lives in a normal standalone build too.

Bug: crashpad:196
Change-Id: Iedab0dd557fa248c6419380b676b71427279bba1
Reviewed-on: https://chromium-review.googlesource.com/883569
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-01-24 18:59:05 +00:00
Joshua Peraza
c56e854984 Fix Doxygen errors
Change-Id: I571d322e75afd33a679c488694db2e7bad3285ea
Reviewed-on: https://chromium-review.googlesource.com/883903
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-01-24 18:21:15 +00:00
Joshua Peraza
24f07f7c43 linux: Enable ARM family exception and thread snapshots
ARM references:
http://elixir.free-electrons.com/linux/latest/source/arch/arm/include/asm/ucontext.h
http://elixir.free-electrons.com/linux/latest/source/arch/arm/kernel/signal.c#L185

ARM64 references:
http://elixir.free-electrons.com/linux/latest/source/arch/arm64/include/uapi/asm/sigcontext.h
http://elixir.free-electrons.com/linux/latest/source/arch/arm64/kernel/signal.c#L371

Bug: crashpad:30
Change-Id: I53f235b5826607db260bd1e43a819a93284843f5
Reviewed-on: https://chromium-review.googlesource.com/865435
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-01-24 17:09:24 +00:00
Scott Graham
c9b41a4d15 fuchsia: Fix removal of /tmp dir on test run, and location of .so files
1. .so files should (I believe) be in /pkg/lib according to
https://fuchsia.googlesource.com/docs/+/master/namespaces.md#typical-directory-structure
(None of the tests that load .so actually work currently, so it doesn't
make anything better or worse to fix this.)

2. The test directory structure looks like:
- /tmp/<guid>/pkg/...
- /tmp/<guid>/tmp/...

Previously /tmp/<guid>/pkg/ and /tmp/<guid>/tmp/ were being removed, but
/tmp/<guid>/ wasn't so there was a bunch of empty directory garbage
being left in /tmp. Clean up from the root instead.

Bug: crashpad:196
Change-Id: I4e82198721f329d597e14a89da8bc77fcc8647c6
Reviewed-on: https://chromium-review.googlesource.com/880884
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-01-23 19:49:10 +00:00
Scott Graham
dea19c7374 fuchsia: Port ElfImageReader and (some of) its tests
(Still need to avoid fork()-dependence for the non-self tests.)

Bug: crashpad:196
Change-Id: Ib34fe33c7ec295881c1f555995072d9ff742647f
Reviewed-on: https://chromium-review.googlesource.com/876650
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-01-19 22:22:21 +00:00
Scott Graham
3a7b80995d fuchsia: Default crashpad_dependencies based on is_fuchsia_tree
Bug: crashpad:196
Change-Id: I0ff0157287e8b84323068741e060ff3c10f9719a
Reviewed-on: https://chromium-review.googlesource.com/871044
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-01-18 23:48:58 +00:00
Scott Graham
9f4ebc713a fuchsia: Get CrashpadInfoReader working
Bug: crashpad:196
Change-Id: Ia9bcc45891fd5cf40cccc655c4b904b1610e5932
Reviewed-on: https://chromium-review.googlesource.com/875117
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-01-18 22:40:28 +00:00
Joshua Peraza
e7fe120d8b ProcessMemory: Add ReadUpTo to enable short reads
ProcessMemory::ReadCStringInternal needs to be able to perform short
reads.

Change-Id: I2b2e1c2e6603d01235d8d2dbd15494375cd7f3f6
Reviewed-on: https://chromium-review.googlesource.com/874776
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2018-01-18 19:59:59 +00:00
Scott Graham
a62033d6c0 Roll mini_chromium to 5fcfa43
Includes:
5fcfa43 Remove .a before alink, otherwise stale .o can hang around

Bug: crashpad:196
Change-Id: Iae361c5e5fa0797be9461eecf0a9c0669e5e6522
Reviewed-on: https://chromium-review.googlesource.com/874811
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-01-18 18:45:38 +00:00
Joshua Peraza
a459d30e9b android: partially disable module tests on ARM before API 21
ProcessReader module tests use dl_iterate_phdr to check that the
loader's modules appear in the ProcessReader's module vector, but
this API is not provided  on Android for ARM until API 21.

Bug: crashpad:30
Change-Id: I7832bb5560f870671812c42345d4b59bf4416a26
Reviewed-on: https://chromium-review.googlesource.com/871972
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-01-18 02:59:44 +00:00
Joshua Peraza
939afcf56e Add process_memory.cc when using gyp
Change-Id: I835b03f1553c04ebc03e3eb1f11455f049342cc5
Reviewed-on: https://chromium-review.googlesource.com/872252
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-01-18 01:15:02 +00:00
Peter Collingbourne
0c57aafb4e Add support for libc++ on Windows.
Use the "POSIX" implementation of ThrowBadAlloc() on Windows when libc++
is being used.

Bug: chromium:801780
Change-Id: I230a8df9040aa73e290bb0d002996e822958a94b
Reviewed-on: https://chromium-review.googlesource.com/872121
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
2018-01-18 00:36:53 +00:00
Scott Graham
f62a30e977 fuchsia: Implementation of MultiprocessExec
This supports multiprocess tests of the non-fork() variety.

Also, improve directory finding so that the
crashpad_test_test_multiprocess_exec_test_child binary can be located
correctly on Fuchsia.

Doc ref for launchpad:
https://fuchsia.googlesource.com/zircon/+/master/system/ulib/launchpad/include/launchpad/launchpad.h#23

Also, roll mini_chromium to pick up ScopedZxHandle addition. Includes:
a19ef08 Merge ScopedZxHandle from Chromium base
f21c900 fuchsia: Move zircon libs dep to base, rather than global

Bug: crashpad:196
Change-Id: Id01dee43f2d04e682e70c12777aff41f8dd848d6
Reviewed-on: https://chromium-review.googlesource.com/868967
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-01-17 23:45:42 +00:00
Scott Graham
380a1e9eaf Make multiprocess_exec_test_child depend on base to get OS_ defines
Some doofus really wanted to shoot himself in the foot (
https://codereview.chromium.org/808493003/diff/80001/util/test/multiprocess_exec_test_child.cc
), and it worked.

Depend on base to get build_config.h instead, so that OS_POSIX is also
set on Fuchsia.

Also, don't call getrlimit() on Fuchsia.

Bug: crashpad:196
Change-Id: I102de22751fd90889bfb59b6c4a577e99357094b
Reviewed-on: https://chromium-review.googlesource.com/868742
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-01-17 18:28:22 +00:00
Scott Graham
4d2414e38e fuchsia: Add implemention of ProcessMemory
Bug: crashpad:196
Change-Id: I04a29afcbb16b5ef14d6f83d7af1d954f5164ee9
Reviewed-on: https://chromium-review.googlesource.com/868736
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-01-16 23:08:41 +00:00
Scott Graham
970ac5a636 fuchsia: Package setup for crashpad_test for in-Fuchsia build
third_party/googletest has been added to the Fuchsia manifest now (which
is a recent copy of googletest that includes googlemock). The BUILD.gn
file isn't there yet, but is in progress.

With these changes, all targets build in-Fuchsia once the googletest
BUILD.gn file lands.

Bug: crashpad:196
Change-Id: I34d2d7046dd2762b4d1f4873be97258df32adddf
Reviewed-on: https://chromium-review.googlesource.com/861242
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-01-16 22:35:41 +00:00
Scott Graham
1d1bf89d62 Roll buildtools to 6fe4a3251488f7af86d64fc25cf442e817cf6133
Includes a number of gn rolls.

Change-Id: Id2cdbaca493b6537de9741109bb81ef8e05327fa
Reviewed-on: https://chromium-review.googlesource.com/865829
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-01-13 00:52:13 +00:00
Scott Graham
4431f76d86 Switch run_tests.py to argparse, and support --gtest_filter
Starting to work on individual tests on Fuchsia, and it's nice to be
to run only one.

Bug: crashpad:196
Change-Id: I1c5d924d2c93ee943673883de0a6022a3666f98c
Reviewed-on: https://chromium-review.googlesource.com/865103
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-01-12 22:47:33 +00:00
Scott Graham
54dc88724e fuchsia: Fix run when gn binary path non-absolute
Oops. I thought GN abspath()d this in the regen rule, but it does not.

Bug: crashpad:196
Change-Id: I33dadc5502a5e56f20ba7e4c0403fbc138f052c9
Reviewed-on: https://chromium-review.googlesource.com/864629
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-01-12 18:59:13 +00:00
Scott Graham
3bc4156c1e fuchsia: Fix qemu script return code on failure
https://build.chromium.org/p/client.crashpad/builders/crashpad_fuchsia_x64_dbg/builds/6
failed in "start qemu", but it wasn't clear that it did because the
script returned 0 when it did so.

Bug: crashpad:196
Change-Id: I7b8f42bc58c273b5b8e9a64e52288b32e9f9addf
Reviewed-on: https://chromium-review.googlesource.com/862990
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-01-12 01:45:21 +00:00
Scott Graham
3a07faf171 fuchsia: Fully initialize TestCrashpadInfo structure
The in-Fuchsia build fails with:

../../third_party/crashpad/snapshot/crashpad_info_size_test_module.cc:89:77: error: missing field 'indirectly_referenced_memory_cap_' initializer [-Werror,-Wmissing-field-initializers]
TestCrashpadInfo g_test_crashpad_info = {'CPad', sizeof(TestCrashpadInfo), 1};

kulakowski mentioned in the context of the = {0} CL recently that
they've turned on some somewhat unusual warnings because they have a
higher-than-usual amount of C code, as well as code that has to build as
both C and C++. I think that's where this one comes from.

Bug: crashpad:196
Change-Id: Ie1b373a32f99615366c7fcd65cd4ae4761385ff9
Reviewed-on: https://chromium-review.googlesource.com/862802
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-01-12 00:58:11 +00:00
Scott Graham
f35799cb41 fuchsia: Ensure qemu instance is ready before continuing after 'start'
Ensures that enough networking is set up before returning so that the
VM will be ready to accept commands to run tests. Otherwise requests to
do so immediately after the VM is started can flakily fail.

Bug: crashpad:196
Change-Id: Idc231e7fc418ad054bb9ec115c1598c804055a96
Reviewed-on: https://chromium-review.googlesource.com/862709
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-01-11 23:53:31 +00:00
Scott Graham
2a51cb5fd5 fuchsia: Fixes for finding GN when in bot configuration
On buildbot, GN isn't in the path, and must be run with a full explicit
path. GN saves this to the build.gn for regeneration purposes, so
extract it out of there.

Additionally, set cwd when calling GN, otherwise, it will be unable to
find the .gn in the root of the source tree.

Bug: crashpad:196
Change-Id: Ia14db175ba0af6dc61b215da6ba5c624bca56886
Reviewed-on: https://chromium-review.googlesource.com/862547
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-01-11 22:47:41 +00:00
Scott Graham
9fa60710f9 fuchsia: Don't use {0} for initialization
Fuchsia builds with -Wmissing-field-initializers. Remove these {0}s. It
all seems a bit awful, but as far as I can tell from reading
http://en.cppreference.com/w/cpp/language/aggregate_initialization, the
0 is unnecessary.

../../third_party/crashpad/minidump/minidump_system_info_writer_test.cc:42:27: error: missing field 'Buffer' initializer [-Werror,-Wmissing-field-initializers]
  MINIDUMP_STRING tmp = {0};
                            ^
			    1 error generated.


Bug: crashpad:196
Change-Id: I21f48eb24238a607475b0e92ffe5fd88386b40b6
Reviewed-on: https://chromium-review.googlesource.com/833454
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-01-10 22:26:59 +00:00
Joshua Peraza
fa197c267c linux: Collect Crashpad options from CrashpadInfos
Bug: crashpad:30
Change-Id: I233780e97a4b23238995af409c5f40d2e809906b
Reviewed-on: https://chromium-review.googlesource.com/848248
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-01-10 21:42:27 +00:00
Joshua Peraza
94d65e0e9c linux: Detect memory map failures correctly
Bug: crashpad:30
Change-Id: I3ff66b72621b8b29ce2676778b1f2f404495869f
Reviewed-on: https://chromium-review.googlesource.com/860887
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-01-10 21:38:57 +00:00
Joshua Peraza
fb379a9242 Add ModuleSnapshotLinux
Bug: crashpad:30
Change-Id: Ibf1f62b82a4926e1dfd9ad92231bfff44b811d78
Reviewed-on: https://chromium-review.googlesource.com/842187
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-01-10 19:41:47 +00:00
Joshua Peraza
878af9cbbd Add AnnotationReader to read annotation types via a ProcessMemory
Bug: crashpad:30
Change-Id: Icd13d29992b8684ca92916068f12428c25e0e775
Reviewed-on: https://chromium-review.googlesource.com/846519
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-01-09 21:52:06 +00:00
Joshua Peraza
70563e92f4 Add CrashpadInfoReader to read CrashpadInfo via ProcessMemory
Bug: crashpad:30
Change-Id: I295d518ee0eef1fd61e5544cd6bad25827d07a02
Reviewed-on: https://chromium-review.googlesource.com/846025
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-01-09 01:27:50 +00:00
Joshua Peraza
8bbe985004 elf: Use d_ptr instead of d_val when reading from a dynamic array
The dynamic array reader should treat data as unsigned when initially
reading values from the array to prevent premature sign-extension. The
glibc and traditional android headers define d_val using Elf32_Word, an
unsigned type. linux/elf.h, used by unified android headers, defines
d_val using Elf32_Sword, a signed type. Use d_ptr instead since it's
always an unsigned type.

Bug: crashpad:30
Change-Id: Ie8e88941fefc7075621aefe226fdba33b1f6129c
Reviewed-on: https://chromium-review.googlesource.com/847818
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-01-08 23:28:21 +00:00
Joshua Peraza
990c6d9cb6 android: add Dlsym() which wraps dlsym
`dlsym` on Android KitKat (4.4.*) raises SIGFPE when searching for
non-existent symbols. This wrapper installs a signal handler prior to
calling `dlsym`.

Bug: crashpad:30
Change-Id: Iee94672d3c11b1fad1b01526eea7df688c0356cb
Reviewed-on: https://chromium-review.googlesource.com/835411
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-12-22 23:43:25 +00:00
Mark Mentovai
7a285816e9 gn, android: Build for Android with GN
With a companion mini_chromium change at https://crrev.com/c/841203,
it’s possible to configure via “gn args” as follows:

android_ndk = "/android/android-ndk-r16"
target_cpu = "x86_64"
target_os = "android"

Note that a standalone toolchain is not required.

Bug: crashpad:30, crashpad:79
Change-Id: Ica55bdcb82c730909c05dd9fecb40a74eca78c8a
Reviewed-on: https://chromium-review.googlesource.com/841286
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2017-12-22 21:23:31 +00:00
Scott Graham
e9d2ca60f7 gn: Mark base_test_support as testonly=true
TBR=mark@chromium.org
Bug: crashpad:79
Change-Id: Iaed4031d7d0bc67d2379501a0dd68c9d9585a61c
Reviewed-on: https://chromium-review.googlesource.com/835793
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-12-20 03:43:07 +00:00
Scott Graham
ab0b9438b9 gn: Fix reference to test_support in chromium style
Bug: crashpad:79
Change-Id: I25c02c2f38819ea1edfd89bf9a4254c83d5ff9f5
Reviewed-on: https://chromium-review.googlesource.com/835848
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-12-20 03:04:46 +00:00
Scott Graham
c86779fd96 gn: Remove duplicated listing of crashpad_handler_test.cc
Messed up during rebase.

Bug: crashpad:79
Change-Id: I401c2112ec2810cb2fce792cf7b2a55643eeb4d8
Reviewed-on: https://chromium-review.googlesource.com/835530
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-12-20 02:54:55 +00:00
Scott Graham
cd7428971f gn: Fix symbol_level use in chromium style
Bug: crashpad:79
Change-Id: I417f17194ee1a8ef157ea1e67e64878ccb6f5c10
Reviewed-on: https://chromium-review.googlesource.com/835528
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-12-20 01:55:55 +00:00
Scott Graham
e7ebdf019e gn: Add missing testonly for chromium and fuchsia styles
Bug: crashpad:79, crashpad:196
Change-Id: I8354b8430cfe4728a635991fb59fcc8ef8652773
Reviewed-on: https://chromium-review.googlesource.com/835468
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-12-20 00:59:17 +00:00
Scott Graham
41c7ace7e8 linux: Add missing build_config.h include
Otherwise, Chromium complains about ARCH_CPU_64_BITS usage without it.

Bug: crashpad:30
Change-Id: I4e10595280d309ae891266c03d0467c6c8471d4e
Reviewed-on: https://chromium-review.googlesource.com/835429
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-12-20 00:29:35 +00:00
Scott Graham
ab153f7e1b gn: Avoid depending on BUILDCONFIG.gn globals
Goes with https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/834648.

Includes mini_chromium DEPS roll to pull in edfe51ce81

Bug: crashpad:79, crashpad:196
Change-Id: Ib45cc738aecf9ae727f8faeff81f3b71e2dc9de8
Reviewed-on: https://chromium-review.googlesource.com/834543
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-12-19 23:38:36 +00:00
Mark Mentovai
3a41c51668 gn, linux: Update build after 9b2ba587f618
Bug: crashpad:30, crashpad:79
Change-Id: Ib50352cfd36d40786b9732e7c4ab50781963369b
Reviewed-on: https://chromium-review.googlesource.com/835028
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2017-12-19 22:36:22 +00:00
Joshua Peraza
9b2ba587f6 linux: Add ExceptionHandlerServer and ExceptionHandlerClient
Bug: crashpad:30
Change-Id: I60874a26ccb281144f870df2b4d16c6970a39f6b
Reviewed-on: https://chromium-review.googlesource.com/772824
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-12-19 20:11:52 +00:00
Mark Mentovai
99b0030616 gn, linux: Build for Linux with GN
This is sufficient for a native Linux build using GN. Android is not yet
supported.

mini_chromium side: https://crrev.com/c/833407

This also updates mini_chromium to 404f6dbf9928.

c913ef97a236 gn, linux: Build for Linux with GN
404f6dbf9928 gn: Don’t use .rsp files; rationalize descriptions and
             output dirs

Bug: crashpad:79
Change-Id: I4f3b72fd02884d77812e520fb95231b35815677d
Reviewed-on: https://chromium-review.googlesource.com/833408
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2017-12-19 19:31:20 +00:00
Scott Graham
a0bd3fee55 fuchsia: Support referencing the Fuchsia tree's third_party/zlib
This renames the "chromium" configuration of zlib to "external". What it
really means is that zlib lives in //third_party/zlib, which happens to
be where both Chromium and Fuchsia put it, with moderately similar build
files.

Bug: crashpad:79, crashpad:196
Change-Id: I380c106ec1f97471b2354166f5cf92885196e1b8
Reviewed-on: https://chromium-review.googlesource.com/833095
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-12-19 02:42:02 +00:00
Scott Graham
1bc07b76ed gn: Use mini_chromium_is_posix in preference to global is_posix
Goes with
https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/833328.

Also roll mini_chromium:

scottmg@around:/work/crashpad/crashpad/third_party/mini_chromium/mini_chromium$ git log 20182dd263312db9fad52042fc92c33331ec6904..e182031 --oneline
e182031 gn: Add is_posix.gni to define local is_posix variable
4cb1344 gn: Enable proper release-mode optimizations for POSIX-non-Mac
9c0eb0c Remove reference to ptr_util.h
c5ae5aa gn: Configure the sysroot in target_sysroot, not sysroot
f7e5654 gn, mac: Honor mac_sdk_min, sysroot, and mac_deployment_target
7701901 Remove the deprecated sparse_histogram.h header.
e2f0160 Use Chromium copyright notice and BSD license in mini_chromium


Bug: crashpad:79, crashpad:196
Change-Id: Ie41d971e0e769db2ed18861da07021c071f6c650
Reviewed-on: https://chromium-review.googlesource.com/833329
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-12-19 00:07:06 +00:00
Scott Graham
457cc6a34f gn: Refactor build files to avoid build/secondary
In doing standalone bringup of Crashpad targeting Fuchsia, it seemed
tidy to keep the same literal paths to the dependencies that Chromium
needed and add stubs/forwarding to build/secondary in the Crashpad tree
as required to make those work.

However, when trying to build Crashpad in the Fuchsia tree itself, that
would require adding forwarding files to the Fuchsia tree to match the
Chromium directory structure, which would be awkward. Instead, have
explicit dependencies in the Crashpad tree that select the locations
for various dependencies.

Bug: crashpad:79, crashpad:196
Change-Id: Ib506839f9c97d8ef823663cdc733cbdcfa126139
Reviewed-on: https://chromium-review.googlesource.com/826025
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-12-18 22:53:58 +00:00
Mark Mentovai
b51adda8d2 Build certain gtest/gmock tests with -Wno-unused-private-field
Fuchsia is using a newer Clang than I was using on macOS when I wrote
these GN targets, and -Wunused-private-field can now detect these
violations.

Change-Id: If71eb74f6453957aa92852cbe53356e325c7b635
Reviewed-on: https://chromium-review.googlesource.com/833195
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2017-12-18 21:08:56 +00:00
Mark Mentovai
1764594bff gn, mac: Work without a sysroot
This is needed to make the “sysroot = "/"” configuration, which
translates to “sysroot = ""”, work properly

Bug: crashpad:79
Change-Id: I25ab49b7d57abfcf0ce9a62925013bb58dadf5dd
Reviewed-on: https://chromium-review.googlesource.com/831007
Reviewed-by: Scott Graham <scottmg@chromium.org>
2017-12-18 18:24:38 +00:00
Mark Mentovai
6e0f15b8f5 gn: Add “system” as a zlib source, used for standalone non-Win/Fuchsia
Bug: crashpad:79
Change-Id: I07e346000ce6df07ac7021056a4cb00d28443e15
Reviewed-on: https://chromium-review.googlesource.com/827745
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2017-12-15 23:16:02 +00:00