138 Commits

Author SHA1 Message Date
Scott Graham
de5bc33b8b fuchsia: Include reference to zx library
"library zx" used to be built in to fidlc, but is now a standalone file
(this is an SDK change). Update the build rules to adapt to this.

ref: https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket.appspot.com/8883567878548782112/+/steps/compile_with_ninja/0/stdout

FAILED: gen/fidl/include/fuchsia/sysinfo/c/client.cc gen/fidl/include/fuchsia/sysinfo/c/fidl.h gen/third_party/fuchsia/fidl/fuchsia.sysinfo/tables.c gen/third_party/fuchsia/fidl/fuchsia.sysinfo/intermediary_representation.json
python ../../third_party/fuchsia/runner.py ../../third_party/fuchsia/sdk/linux-amd64/tools/fidlc --c-header gen/fidl/include/fuchsia/sysinfo/c/fidl.h --c-client gen/fidl/include/fuchsia/sysinfo/c/client.cc --tables gen/third_party/fuchsia/fidl/fuchsia.sysinfo/tables.c --json gen/third_party/fuchsia/fidl/fuchsia.sysinfo/intermediary_representation.json --name fuchsia.sysinfo --files ../../third_party/fuchsia/sdk/linux-amd64/fidl/fuchsia.sysinfo/sysinfo.fidl
../../third_party/fuchsia/sdk/linux-amd64/fidl/fuchsia.sysinfo/sysinfo.fidl:7:7: error: Could not find library named zx. Did you include its sources with --files?
using zx;
      ^~

Bug: fuchsia:7802
Change-Id: I10c0109fd9621a19d72deb21a489c2041caeeeca
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2141019
Commit-Queue: Scott Graham <scottmg@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
2020-04-08 20:45:01 +00:00
Leonard Chan
8bad6f140e [UBSan] Temporarily disable UBSan for gtest and file
These should be the remaining instances of UB errors we see.

Bug: fuchsia:46805
Change-Id: Id8285386fd6cb52518f6076ddb79ac60025f9f87
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2067754
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2020-02-24 17:26:35 +00:00
Justin Cohen
75ea787a80 Adds plumbing for xcuitests with a placeholder test.
Also adds basic integration for EDO.

Change-Id: If3d193a4967a566b55d6d446585e2988dacad6e6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2028183
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-01-31 03:39:51 +00:00
Nico Weber
2fd16e3392 Reformat all gn files
Port of chromium-side
https://chromium-review.googlesource.com/c/chromium/src/+/1997899

Bug: chromium:1041419
Change-Id: Ic7afefa0dea024da37fe4bb0f965840a160e2166
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2015428
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2020-01-23 13:59:00 +00:00
Scott Graham
af5d5468e0 Rename FIDL tables to .c due to use of designated initializers
Will also need https://fuchsia-review.googlesource.com/c/fuchsia/+/348593 to land in the SDK to fix the bots.

Very helpful link: https://ci.chromium.org/p/crashpad/builders/try/crashpad_try_fuchsia_arm64_dbg/728

Change-Id: Iacdbb13a72d116bd579f5f10cadbe7a0b3ed7987
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1966371
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-12-13 16:46:32 +00:00
Scott Graham
272c4bb64e fuchsia: Add missing transformer.cc to fidl_base
Fix fidl_base build, again. Fixes broken tryjobs as seen in
https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1872188.

Change-Id: Iaec1613b3b335fac501227b7a86134309f52d7f3
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1899650
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2019-11-05 19:07:27 +00:00
Scott Graham
b2e26bc455 fuchsia: Fix fidl_init_txn_header link error
Add missing/new fidl_base/txn_header.c to fidl_base library in Fuchsia
build. However, that transitively includes files that use static_assert
via assert.h, which is a C11 feature. Per
https://fuchsia.googlesource.com/fuchsia/+/master/docs/development/api/c.md#Language-versions-C-1
Fuchsia does not aim to support C99, so change the build setting in mini_chromium as well in
https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/1876894

Includes mini_chromium roll:
2298dbe9d0b3213720ac0e5418ad0013a19aeb5d Change cflags_c from c99 to c11
63dfdbd690244c58c1595543806bafd5e5f8aabd Adds support for codesigning iOS app bundles.
ae8e6c54b9a6ea2fd4ff64aab61227d9fad1897e Adds GN rules for ios app bundles.

Change-Id: I09c93d5b2b7ae197c8dc95b83e9c467a68ee51f1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1876893
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-10-23 20:16:37 +00:00
P.Y. Laligand
10a1d2d877 [fuchsia] Use the appropriate separator for FIDL library names.
Bug: fuchsia:35562
Change-Id: If465af3d91c418b448f837b850e10e8d12f3281b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1776919
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2019-08-29 22:18:32 +00:00
P.Y. Laligand
1c7023875b [build] //zircon/public/fidl --> //zircon/system/fidl
Bug: fuchsia:35562
Change-Id: Ic50ae72b870fe8aa415539a93aae4eaa2647731a
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1773124
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2019-08-27 21:14:25 +00:00
Scott Graham
50aa576622 Disable implicit fallthrough warning for zlib
https://logs.chromium.org/logs/crashpad/buildbucket/cr-buildbucket.appspot.com/8903960674082840512/+/steps/compile_with_ninja/0/stdout

I don't understand how this lingered for so long as I can't see what
changed. mini_chromium has had -Wimplicit-fallthough enabled for a long
time (https://chromium-review.googlesource.com/899847), and zlib DEPS
hasn't changed in a long time either
(https://chromium-review.googlesource.com/438585).

The most likely would presumably be that the compiler started
not-ignoring the enabling of the warning? But that doesn't seem too
likely either.

Bug: crashpad:309
Change-Id: I57480cc3f669ef94d0234afaf980281b7ddf8c51
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1772205
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2019-08-27 19:18:05 +00:00
Vlad Tsyrklevich
6b5e30db28 Fix signed-unsigned-wchar build failure
Fix a build failure introduced by a new error diagnostic
(-Wsigned-unsigned-wchar) in clang that has been fixed in a newer
version of gtest and revert commit
a34bca8611b6263632a94d3d773df076c81d03dd which worked around it.

Change-Id: Ibe332bf65215e4722fd962540f144c435f77b2fb
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1753067
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
2019-08-16 17:00:25 +00:00
Scott Graham
a34bca8611 Disable warning when building gmock tests
On recent clang builds, some gmock tests are failing to build:

FAILED: obj/third_party/gtest/gtest/googlemock/test/gmock_all_test.gmock-actions_test.o
../../third_party/linux/clang/linux-amd64/bin/clang++ -MMD -MF obj/third_party/gtest/gtest/googlemock/test/gmock_all_test.gmock-actions_test.o.d -D_FILE_OFFSET_BITS=64 -DGUNIT_NO_GOOGLE3=1 -I../../third_party/gtest/gtest/googlemock -I../../third_party/gtest/gtest/googletest -I../../third_party/gtest/gtest/googlemock/include -I../../third_party/gtest/gtest/googletest/include -Wall -Wendif-labels -Werror -Wextra -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wsign-compare -fno-exceptions -fno-rtti -fno-strict-aliasing -fobjc-call-cxx-cdtors -fstack-protector-all -fvisibility-inlines-hidden -fvisibility=hidden -Wheader-hygiene -Wnewline-eof -Wstring-conversion -stdlib=libstdc++ -fPIC -Wimplicit-fallthrough --sysroot=../../third_party/linux/sysroot -pthread -Wexit-time-destructors -Wno-unused-private-field -std=c++14 -Wno-inconsistent-missing-override -c ../../third_party/gtest/gtest/googlemock/test/gmock-actions_test.cc -o obj/third_party/gtest/gtest/googlemock/test/gmock_all_test.gmock-actions_test.o
../../third_party/gtest/gtest/googlemock/test/gmock-actions_test.cc:109:37: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
  EXPECT_EQ(0U, BuiltInDefaultValue<unsigned wchar_t>::Get());
                                    ^
...

Disable this warning for now.

Change-Id: Ibd41a6fc12d1f13eca5227775e2559ccf3baf229
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1754722
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-08-14 21:50:03 +00:00
Francois Rousseau
8b8066297c [fuchsia] remove obsolete FIDL string.cc include
the code moved to string.h and the SDK no longer includes that source file

TESTED=fix the broken Fuchsia bots

Change-Id: I2ad39e6bc4d90e7a79ab380899bd20a84d0df465
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1724907
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2019-07-30 17:57:45 +00:00
Scott Graham
b1dbfc65be Fuchsia: Update SDK build from cpp to cc
Fuchsia recently globally renamed all .cpp to .cc and some of that leaks
out into the SDK.

Change-Id: Id04c7e18cde77674dc6c1a40f9e378bb182951c8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1682767
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2019-06-28 21:31:44 +00:00
Roland McGrath
bc9104541f [fidl] Convert from - to . names for //zircon/public/fidl
This is part of a soft transition to replace fuchsia-foo-bar names
with fuchsia.foo.bar names for the directory and GN target names for
FIDL libraries defined in //zircon/system/fidl and accessed in legacy
GN via //zircon/public/fidl.  After the transition, the directory and
GN target names will exactly match the FIDL library names everywhere.
 1. Make //zircon/public/fidl/a.b.c alias //zircon/public/fidl/a-b-c
 2. Convert all //zircon/public/fidl uses outside fuchsia.git & integrate
 3. Convert all //zircon/public/fidl uses inside fuchsia.git
 4. Remove transition hacks
 5. Enforce naming conventions in GN templates
This is step 2.

Bug: ZX-3365 #comment //third_party/crashpad references converted
Change-Id: Ief90c6f9fa1da51dea7dbbd5b58741cbb7e06891
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1608163
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Roland McGrath <mcgrathr@chromium.org>
2019-05-16 23:49:37 +00:00
Francois Rousseau
77b2b2f1d0 [fuchsia] change attachments from filepaths to VMOs
* we start with VMOs in Fuchsia so this avoids a temporary file before writing the files in the database
* in order to do a soft transition, we add the new type and leave the old one until the caller in Fuchsia has been updated.

Bug: fuchsia:DX-1270

Change-Id: I3c77c775a186801dbcc7379e84ad5795f41780e7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1554011
Commit-Queue: Francois Rousseau <frousseau@google.com>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2019-04-10 19:29:17 +00:00
Francois Rousseau
83f6f43d81 [fuchsia] allow generation of C++ bindings for FIDL dependencies
Bug: fuchsia/DX-1270
Change-Id: I99edcfcc96baa00affd129f9249fe6e3c565812b
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1560311
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2019-04-09 21:03:52 +00:00
Francois Rousseau
0c618f8317 [fuchsia] define zx and fidl_base in their own source_set
ideally these source_set would be create programmatically from the corresponding meta.json

Change-Id: I4374aef5614c75603132dcdf8d32a687fb9cbadc
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1560077
Commit-Queue: Francois Rousseau <frousseau@google.com>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2019-04-09 20:24:52 +00:00
Francois Rousseau
7411c8354b [fuchsia] use source_set for C FIDL library
this makes it easier to depend on what we want (the C bindings) rather than having to maintain two lists in sync (sources and deps)

Change-Id: Ib3c7715cf8e54658ab44e4de04d04acedf13d09c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1558821
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2019-04-09 17:24:12 +00:00
Joshua Peraza
cc0c2f90df Add lss to third_party and use sys_getpid()
More syscalls to come.

Bug: crashpad:265
Change-Id: Ib139e638b0356426f922650249632132fd613f6f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1540403
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2019-04-09 00:53:01 +00:00
Francois Rousseau
c8dc08b719 [fuchsia] clean up third_party/fuchsia/BUILD.gn
Change-Id: I5c5f03ea5882592008d11e2819962e8781954ca2
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1555833
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2019-04-08 16:13:29 +00:00
Francois Rousseau
0730f0c60c [fuchsia] rename gn group to fuchsia
now that we import fuchsia-sysinfo and fdio, this isn't really just zx anymore

Change-Id: Ic42359ce3d230e214ebdbbefb880ccb021434a0f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1555533
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2019-04-05 23:33:12 +00:00
Mark Mentovai
2a47ea4663 Obtain the Fuchsia SDK from the correct (updated) location
Since a mac-amd64 SDK is now published in addition to linux-amd64, use
it on macOS instead of repurposing linux-amd64.

Many thanks to Scott Graham <scottmg@chromium.org> for helping out at
https://chromium-review.googlesource.com/c/1506419.

Bug: crashpad:279
Change-Id: I4f108222ec2e75dea93fe32053ab470ac7ce48b9
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1503688
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2019-03-06 22:29:08 +00:00
Mark Mentovai
3332ae3546 compat: Provide <elf.h> and <mach-o/loader.h> for everyone
I’m working on something that I’m not ready to share, but maintaining
these compat headers in my local branch is becoming annoying because
“git cl format” keeps reformatting them since they were added since my
local branch point.

Because these headers are non-trivial, they’re brought nearly unmodified
from upstream into third_party, with forwarding from the appropriate
locations in compat.

<elf.h> comes from glibc 2.29 (2019-01-31) and was modified to remove
the #include of <features.h> and to replace the use of __BEGIN_DECLS and
__END_DECLS with the proper conditional extern "C" construct.

<mach-o/loader.h> comes from xnu 4903.221.2 (macOS 10.14.1, 2018-10-30)
and was modified to remove the unused #includes of
<mach/machine/thread_status.h> and <architecture/byte_order.h>. Rather
than taking <mach/machine.h> and <mach/vm_prot.h> with a spider web of
other dependencies from xnu, compat has cut-back versions of these
headers that provide only the required typedefs.

This also includes an update of apple_cf to 1153.18 (OS X 10.10.3,
2015-04-08), the last public release of CF-Lite. The change doesn’t do
much for our purposes, but it restores the file to an Apple-shipped
state, trailing whitespace and all.

This also canonically formats BUILD.gn. 48ee086ca4c4c didn’t format it.

Change-Id: Ib4f28ad53d9757bd0eed838e148c51172bfe30b1
Reviewed-on: https://chromium-review.googlesource.com/c/1489795
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2019-02-26 22:48:14 +00:00
Mark Mentovai
2271f00fe0 Add missing BUILD.gn for third_party/apple_cf
apple_cf is just a header, but we’ve got a BUILD.gn for
third_party/cpp-httplib, which is also just a header.

Change-Id: Ib42c25657b5964678d14682a0a802ebef0e4cb2f
Reviewed-on: https://chromium-review.googlesource.com/c/1489182
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2019-02-26 16:39:24 +00:00
Mark Mentovai
8694cbf33e Update gtest to 9518a57428ae0a7ed450c1361768e84a2a38af5a
4665eee10a1d test, please ignore
826656b25f62 Remove workarounds for unsupported MSVC versions
c43603f288f4 Remove GTEST_HAS_HASH_SET/MAP check
a3a42514f1a9 Define GTEST_DISABLE_MSC_WARNINGS_PUSH/POP for all
             compilers
48021336904c Add back warning suppression that shouldn't have been
             removed
1454f301c554 Update README.md
09beafcd1d54 Merge branch 'master' into patch-1
7a0680dc2230 Merge pull request #1959 from robinlinden:remove-msvc-
             workarounds
d5932506d6ee Merge pull request #1961 from coppered/patch-1
c5f08bf91944 Googletest export
e46e87bb1f76 Googletest export
aac18185ebb4 Googletest export
8e86f6726164 Googletest export
45d66d81bec9 Googletest export
5dab7be70d62 Googletest export
c2989fe29b6a Googletest export
b49266606875 Googletest export
bb7c0ecbdf47 Googletest export
64368e0584e0 Googletest export
f7779eb3cb5d Googletest export
a3013cceffbe Googletest export
3cf8f514d859 Update build badge
ce526b87007a Issue #1955: Remove THREADS_PREFER_PTHREAD_FLAG
28a3261fdf94 Create CODE_OF_CONDUCT.md
87589af5ba5a Update .travis.yml
2f126c74d264 Update .travis.yml
5404fd7d06a8 Update .travis.yml
915f6cfef369 Update .travis.yml
fca458cab75b Googletest export
191f9336bc92 Merge pull request #1977 from

             lukasm91:issue_1955_remove_pthread_flags
b22d23667b60 Googletest export
8fbf9d16a63a Googletest export
775a17631217 Fixed typo
a42cdf2abdc0 Googletest export
26743363be8f Googletest export
ba344cbc405f Googletest export
10e82d01d94c Update README.md
a28a71ae41fa Update README.md
214521a1486d Update WORKSPACE
3fd66989bb5c Googletest export
067aa4c28bb1 Do not define GTEST_IS_THREADSAFE within GTEST_HAS_SEH
3d71ab4c37de Googletest export
fe14e3030737 Merge pull request #1995 from siddhanjay/patch-1
2c8ab3f18b2e feat:  Add initial support for PlatformIO and Arduino
695cf7c96249 Merge pull request #1997 from gpakosz:GTEST_IS_THREADSAFE
39c09043b83e chore:  Add initial library.json config
d9251df84951 fix: Remove global chmod from Travis
31eb5e9b873a chore:  Update version to latest release
b5c08cb9f4f1 Cache gcc and clang APT packages
06bb8d4d6dcf Googletest export
6cbd3753dc19 Googletest export
ea5e941d8470 Change directory ownership earlier
fc0f92676865 Don't cache APT packages on OS X/macOS
3b1f43c2e7a5 Use if statements
b545089f5117 Merge pull request #2004 from cotsog/patch-1
6ef591381372 Googletest export
3949c403c0ed Update README.md
81f00260668d Googletest export
c6cb7e033591 Googletest export
b5f5c596a991 Merge pull request #2000 from
             ciband:feat/add_support_platformio
1496f73cc4c3 fix:  correct JSON syntax
0f698c830f79 chore:  Add .vs to .gitignore for Visual Studio
096fb37a1976 Googletest export
1ec20f87e390 Googletest export
b7dd66519f4a Googletest export
ed3f9bb22960 Googletest export
85c4172ed66e Update README.md
7515e399436a Googletest export
9ab640ce5e51 Googletest export
e26a3fa13ca2 Googletest export
9494c45e75a5 Googletest export
a83cc11abe48 Googletest export
b93a13ec4db4 Improvements have been made to the example/sample makefiles
             for both googlemock and googletest. Library files are now
             created and named like versions produced by Cmake
34a99e547ab7 Googletest export
4160336cb433 Merge pull request #2013 from ciband:chore/fix_library_json
150613166524 Update README.md
c0ef2cbe42df fix:  Correct GitHub paths
16269ae2f857 Merge pull request #2027 from ciband:chore/fix_library_json
77004096e850 Update README.md
6729a1361150 Merge #2002
0cf2130c0b59 Update Xcode project file
3bedb5a9fc36 Merge pull request #2035 from syohex/update-xcode-project-
             file
6d5ce40d4c27 fix:  Add additional source and include directories
de99386b67a3 Merge branch 'chore/fix_library_json' of
             https://github.com/ciband/googletest into
             chore/fix_library_json
25905b9f9a45 Merge branch 'master' of
             https://github.com/google/googletest
2ace910a3580 Revert "test, please ignore"
8ed34e0f6b4e Remove outdated scripts
933e5df28372 Merge pull request #2039 from gennadiycivil/master
f8b1c1af1775 Googletest export
14c2fba7349e Googletest export
1bcbd5871e34 Merge pull request #2037 from ciband:chore/fix_library_json
bfcc47fc2f61 Merge pull request #2026 from
             justin6case/example_makefile_improvements
8a27d164cbc7 Update README.md
6e410a3ae965 Update README.md
ac8c102dae66 Update README.md
3a460a26b7a9 Googletest export
827515f8a092 Googletest export
5d3a2cd9c854 Update docs, TestCase->TestSuite
58e62f7a989c Merge branch 'master' of
             https://github.com/google/googletest
3880b13e4c0b Merge pull request #2042 from gennadiycivil/master
ade8baa7d213 clang-tidy: modernize-deprecated-headers
8369b5bbd0dd fixing build errors for unused parameter
b6cd405286ed Googletest export
644319b9f06f Merge pull request #2048 from ciband:chore/clang_tidy
216c37f057ae Googletest export
f31bf1d362af Googletest export
50f1a77955bd Merge pull request #2051 from enptfb55:master
7a7e2bba1d62 Googletest export
bc1023b4131c Googletest export
6693e85b0402 Merge branch 'master' of github.com:google/googletest
2edadcedf350 Workaround homebrew issue
0599a7b8410d Googletest export
097407fd3cfb Googletest export
9acd065a905a Googletest export
eb9225ce361a Googletest export
0adeadd28302 Googletest export
9518a57428ae Googletest export

Change-Id: I2029f907549bed52816fd3660be5b77ad19e73c9
Reviewed-on: https://chromium-review.googlesource.com/c/1427241
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2019-01-22 20:57:37 +00:00
Scott Graham
25048d37f8 fuchsia: Remove log.cpp and log.h
zx_log_ is being removed in favour of zx_debuglog_, and so log.h/cpp
will also be going.

Bug: fuchsia:ZX-2184
Change-Id: I4f342d05716745d1248fe1de6e7cd2f92ff1dea3
Reviewed-on: https://chromium-review.googlesource.com/c/1407534
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2019-01-11 23:27:14 +00:00
Tom Tan
761c6fe8be Add Windows ARM64 support to Chromium crashpad
Bug: chromium:893460
Change-Id: Ifbeb6f937a6b96c77b02dcf8afe492c5bc617435
Reviewed-on: https://chromium-review.googlesource.com/c/1347773
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2018-12-12 21:54:55 +00:00
Francois Rousseau
3ca0713430 roll googletest to b18d39
* 71d4fc is the change fixing death tests on Fuchsia where the exception was still caught by the system exception handler
* we need up to b18d39 to make Windows happy

Change-Id: Ic938caabe3dde93ebda520b389b166d78c4460a6
Reviewed-on: https://chromium-review.googlesource.com/c/1350931
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Francois Rousseau <frousseau@google.com>
2018-11-26 23:52:28 +00:00
Joshua Peraza
dc0052bd43 Fuchsia: Use SDK manifest for CC prebuilt and source packages
Upstreams:
https://chromium-review.googlesource.com/c/chromium/src/+/1292570

Change-Id: I366651f57076dd0e854daa6f23a6dfa47babf60d
Reviewed-on: https://chromium-review.googlesource.com/c/1315432
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-11-02 17:30:22 +00:00
Braden Kell
5dd094381c [sysinfo] Convert sysinfo ioctls to FIDL calls
Bug: fuchsia:ZX-2842

Change-Id: Ib84b4319d3bb07a2c68bc2ff0d63e49fa65eb2b5
Reviewed-on: https://chromium-review.googlesource.com/c/1292237
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-10-29 20:24:55 +00:00
Vyacheslav Egorov
bf327d8ceb Introduce "dart" dependencies configuration for embedding into Dart VM.
This configuration has the following dependencies layout:

* gtest should be pulled from //third_party/googletest
* zlib from //third_party/zlib
* base from //third_party/mini_chromium/mini_chromium/base
* Windows build configs come from //build/config/win:*.

Bug: crashpad:
Change-Id: I22b44d4f85349383063bf3785a321e3c23d88853
Reviewed-on: https://chromium-review.googlesource.com/c/1291378
Commit-Queue: Vyacheslav Egorov <vegorov@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-10-22 17:35:35 +00:00
Wez
bc50af15a2 Migrate from ScopedZxHandle to libzx containers.
Bug: chromium:852541
Change-Id: Ie05c70f249e6f843183a02ec61fd09f6a0607598
Reviewed-on: https://chromium-review.googlesource.com/1148923
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
2018-08-01 17:38:19 +00:00
Charly Delay
3072b4059f zlib.gyp: support the "external" dependency mode
This CL implements support for the external model for Crashpad's zlib
dependency, in which the dependencies and Crashpad are checked out as
sibling in the same directory.

Bug: crashpad:
Change-Id: I0ca640e0be9b6a4fd8379026dfc8eb061b40badf
Reviewed-on: https://chromium-review.googlesource.com/1124778
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-07-06 17:28:08 +00:00
Scott Graham
bff3594594 fuchsia: Update includes for new fdio header location
Also includes a gtest roll, which includes a change in gtest to do the
same thing. This also removes the link against launchpad which is no
longer necessary, and will be removed from the SDK soon.

Bug: crashpad:196, chromium:848028, chromium:850757
Change-Id: Ica8632a6157b585d6b44073e05bf7aa43253e305
Reviewed-on: https://chromium-review.googlesource.com/1096353
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-06-12 16:47:21 +00:00
Scott Graham
9a97daff39 Add libfuzzer support
Adds the build support for using libfuzzer controlled by setting
`crashpad_use_libfuzzer=true`.

Also adds a first fuzzer (for ElfImageReader). Currently only runs on
Linux, but should work on Fuchsia too with some minor fixes (not sure
yet whether the fixes required are toolchain or in our build setup).

Run as:
  out/lin/elf_image_reader_fuzzer snapshot/elf/elf_image_reader_fuzzer_corpus/
hits an OOM pretty quickly in trying to allocate a giant buffer.

Bug: crashpad:30, crashpad:196, crashpad:233
Change-Id: Idd3ca11fe00319b8b29e029d5e13b17bfd518ea0
Reviewed-on: https://chromium-review.googlesource.com/1083451
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-06-07 21:09:53 +00:00
Scott Graham
3edb7869da Roll cpp-httplib to HEAD (5b3187e2f)
Bug: crashpad:196, crashpad:227
Change-Id: If798744a71aec63e5320cc3300b70d24fed5ceae
Reviewed-on: https://chromium-review.googlesource.com/1082025
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-06-04 18:33:07 +00:00
Scott Graham
9de3535bbb fuchsia: Re-add launchpad for now
launchpad usage directly in Crashpad was removed, but gtest still uses
launchpad (for death tests) so keep it here for now (until the gtest
upstream change has landed to remove launchpad there).

Also, roll mini_chromium and remove link of zircon, since that's in the
base configuration now.

Bug: crashpad:196
Change-Id: I68b1092aaa6fc31efe693e3fcd5bde71c2d91d42
Reviewed-on: https://chromium-review.googlesource.com/1083611
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-06-02 00:01:54 +00:00
Adam Barth
1299754179 fuchsia: Migrate off launchpad
Rather than using liblaunchpad.so to create processes, we now use
fdio_spawn.

Bug: crashpad:196
Change-Id: I28a7c12c823f0a0d120962edfce2e2197302b9cb
Reviewed-on: https://chromium-review.googlesource.com/1080234
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2018-05-31 04:01:08 +00:00
Scott Graham
5c49c59847 fuchsia: Implement TLS support in HTTPTransportSocket
With use_boringssl_for_http_transport_socket set, this also works on
Linux, however the bots fail during run lacking libcrypto.so.1.1. So,
not enabled on Linux until that's figured out.

(Includes https://github.com/yhirose/cpp-httplib/pull/70, until it lands
and I'll do a full roll of cpp-httplib then.)

Bug: crashpad:30, crashpad:196
Change-Id: I987f6a87f8e47160c15e53fe1ce28611339069ff
Reviewed-on: https://chromium-review.googlesource.com/1075726
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-29 23:19:09 +00:00
Scott Graham
f5564e6292 Roll gtest (and mini_chromium)
gtest started depending on zircon and launchpad directly for death
tests, so tweak the build files.

Logs for upstreams below:

mini_chromium$ git log --oneline --no-merges --no-decorate 40cb6722bbc6bd6fb5fccecd80362313440a0537..53a3ff4cf81adb25fdf764e8547a8515fc8f70c2
53a3ff4 fuchsia: Add fdio to system includes
23b3647 fuchsia: Update sysroot.gni for sysroot location moving in SDK

gtest$ git log --oneline --no-merges --no-decorate d175c8bf823e709d570772b038757fadf63bc632..145d05750b15324899473340c8dd5af50d125d33
49ecebd Downgrade to C++98.
ec2c911 Downgrade to C++98 code.
f91bf75 Remove unused variable in Fuchsia.
54e331b Add support for versioned standard libraries.
fc66ae4 Update generated code.
b8fa4d2 Add unit test for CanonicalizeForStdLibVersioning.
18abd8f Use NULL instead of nullptr, for pre-C++11 builds.
ec5ad0f Fix the bug where ad_hoc_test_result() functions of UnitTest and TestCase objects would return failures registered at TestCase and UnitTest scopes, respectively.
960149f Remove magic number
242f0f6 Style fix
8497540 Fix comments
13af91f Fix more stuff and get tests to pass
96c3c42 Get all the things to work.
a9653c4 Fix gmock not building when -fno-rtti
b6cb5c3 Fix stuff
d4b5281 Add Fuchsia support for death test.
95ec42d Add no-exception and no-rtti to build matrix
b539167 merging,
bb7a018 reverting, test
7b4ee66 reverting just to test
62a7c14 testing
2d3024f Fix friend declaration to use GTEST_API_ decl spec.
b2f97ab Revert useless use of GTEST_API_ on WithoutMatchers decl.
1c79ad7 Add GTEST_API_ tag to WithoutMatchers class. Hopefully that fixes the problem on MSVC?
d5725da Mark new GetWithoutMatchers method as part of the exported API, to address MSVC linker errors.
f6551f2 Don't use generalized initializer list; is C++11 extension.
f437f8c Clone of unsubmitted cr/176529515. Introduce parameterless expectations.
f312435 more typos
a0fd742 msvc
b00e281 more typos
881ee30 typo
10e8ec2 move only types docs
4d554c3 typo
b4cbf53 typo
78d7381 http://cl/193386206
c56ba73 merge, explicit, ( should be it)
4707c0f 193353312
80d6e26 cl/193060888
5dccf6b http://cl/193060888
dff32af http://cl/193060888
3f88bb1 test-meerging
ec425d7 typo
e4ab316 more msvc
1944bc0 typo
e9eff48 msvc warnings
bd2a1ae merging gmock generated matchers
9fba103 merging, testing, this should be it
1c6e68c merging
26c10dc merging
d84eb86 more pizza
f45728a more OSX pizzas
b74a1af osx pizzas
f9bd618 merging gmock actions test
0bfa823 merging, gmock actions test
2dc576e merging
f7330f9 more fixing osx libstd++ bugs
6538049 fixing
dc4f563 merging, fix OSX issue
092ca91 merging
a79851f merging
fa658e0 merging
c67f51b msvc
9b5940e revert this one
b2d81b4 merge, ... gmock-matchers test
e77deb2 small cleanup
1324e2d Remove multiple inheritance from "unintesting call" mock classes.
373481c ...merging
8654c1c merging
ab84d14 Upstream cl/192179348
c13ab60 merging
5cd213e ..and this should be it
6a7573a more
039d9b5 pizza work, cont
f15fd96 osx pizzas, cont
b15be9a fixing osx pizza
6f9db26 merging
9bc82ce merging
25d8176 merging
e1071eb RE-Doing the merge, this time with gcc on mac in the PR so I can catch errors before merging the PR
8fbb419 Include gcc on mac into PR matrix
ca54b67 Revert "gmock actions 2"
64d24b8 ... and this
c1d4c34 this should be it
f587100 yet more
05b5a53 formatting
2de24fb tuning
055f321 tuning
57d6e82 more
44da2b9 cont
e93a0ec msvc
c4684b4 more msvc
431bfdc msvc 14
8bc7c63 testing msvc again
c4e3d77 More msvc 14
6525044 And also silence for MSVS14
35a709a preproc syntax ( I can never remember it)
61e8a0b syntax
03be5df cont.
e0b3c26 continued
51f8ad4 Sync gmock-generated-nice-strict.h.pump with gmock-generated-nice-strict.h.
dbd206e more mcvs fixing
701e1e5 linkage, fixing MSVC
2d4d4ef fixing MSVC
5fe8de5 more warnings
cb13dc7 more warnings
d9f3611 more MSVC warnings
c75b76e warnings
04e3188 cont - 2
32ac949 cont
1831ac9 more warnings
eb3e4aa deal with MSVC warn, cont 1
50c0bcd Cont. deal with MCVS warnings
b5c87fb Deal with MCVS warnings
88fc7d7 merging gmock-actions 2
fe402c2 Merging gMock, 2
7e5f90d formatting
9286361 And more MCVS warnings
e0f4cf0 fixing MCVS warn
7045138 Have to wait for this one
66eaf9f Have to wait for this one
af93d59 Merging matchers test
0cd6a4f Merging matchers test
d81b6a0 bad cut/paste
a608d4a More on MSVC warning C4503, decorated name length exceeded
6f4e939 More on MSVC warning C4503, decorated name length exceeded
5b3d277 Address MSVC warning C4503, decorated name length exceeded, name was truncated
aa14cc4 Fixing build break on MSVC
e55089e merging gmock matchers 1
a0c27bd fix build break on locale windows
1776ed8 Tweaking https://github.com/google/googletest/pull/1523 to exclude nacl
d52aaee Upstreaming, cl 191344765
a2dd136 merging port, cont. 191443078
aa349ac merging, cont - 2
2cedd5b merging gtest-port.h , 191439094
04d1e56 merging, just comments format
5beb452 testing, merge
df5a48d Testing, gtest-port.h merge
87a4cdd merging gtest-port.h, again - 1
7888184 Include OSX builds back into PR builds
b2373c6 Revert "merging gtest-port 1 of N"
54bb165 Revert "merging gtest-port, 2"
d04bf07 typo
8e0364a merging gtest-port, 2
11855d8 provide alternative for DebugBreak()
aea6fc3 merging gtest-port 1 of N
a75a5c9 merges 1
3df7cbe merges, gtest
6aae206 merging gmock-matchers.h 3
2318705 merging gmock-matchers.h 2
8ea10d3 Upstreaming FloatingEq2Matcher,
b907c26 Merging gmock-matchers.h -2
466a49a gmock-matchers merging -2
b7c5683 merging, gmock -1
4e89c76 reverting gtest_list_tests_unittest.py
eaaa422 Update appveyor.yml
da71e8c more merges
0f65679 more merges
691e38e More merges
a3c2e10 cl 189032107, again
080fcbe cl 189032107
a178cc7 merge, again, IsRecursiveContainer
262aaf2 erging, cont
2814b4b merging, merging
a719320 fixing, was removing too much
af463c4 More merges, removing old dead code
7b70413 Allow macros inside of parametrized test names.
cf9d634 merges-port(1)
e891900 Merging, XML tests
89d6f70 merges-8
995a9df merges-7
086825d merges-6
8385928 merges-3
dbf63e3 merges-2
0d5e01a Merges-1
7a2050d Use a full message in the JSON output for failures
3431b69 Add options to parallelize builds.
6baf17e Support JSON output format in addition to XML
2eb31c1 Add documentation for VariantWith.
2bd1750 gmock merging -2
190e2cd Add matcher for std::variant.
84ec2e0 Switch default death test style back to "fast".
20074be Use DEBUG_POSTFIX instead of CMAKE_DEBUG_POSTFIX
4dbb437 merging unittests - 5
567b40e Try to handle unsigned wchar_t (arm) a bit better
004f6a0 merging unitests - check 4
29e9ca8 merging unitests, check
3299a23 merging unittests - 2
b7e0294 merging unitests
11e1dd2 Removed trailing comma in enum
0656830 TEST() arguments are invalid in an example
df65632 merges
8a61587 Fix unused function warning on Mac OS.
a3e322b cleanup, merges
09581b3 cleanup/merges
0697241 merging, cleaning up
ab186a8 merges
30d276d cxxx11
3b1fe3e clang warnings
d7c966c clang warnings
2a23ca0 https://travis-ci.org/google/googletest/jobs/340995238
a66d209 clang warning 'https://travis-ci.org/google/googletest/jobs/340987201'
e76f4ee clang warning https://travis-ci.org/google/googletest/jobs/340978022
9e07281 merges
225e674 moving JoinAsTuple to internal
b3a1759 Fix std::iscntrl use in gtest-printers.cc
d84f58a Merging, coniniue
575c081 merging
49fc378 merges
ec7faa9 merges
c851050 Fixed typos
092d088 Add ability to throw from ASSERT
a3c73ed Include MSVC14 on PRs as well
e6ec8bc Merges and also adding new bazel build mode
e55fded Code merges
2a46830 Ability to optionally depend on Abseil plus upstream of 183716547
6c0c389 Adding tests to googlemock bazel
fbb48a7 Code merges
efd49c2 Update Documentation.md
b8ac390 Fix test build issue with GCC7.2.
3498a1a Use _CPPUNWIND instead of _HAS_EXCEPTIONS with MSVC.
f915530 Pass -EHs-c- to disable exceptions with MSVC.
b3a2048 Update README.md
7cced89 Remove Visual Studio 10,11,12 from build matrix
b9651c0 placating gcc and its overzeauls size comparison warnings
e29805a upstream cl 182543808
06c3cce revert, lets get this compiled
80defce Many code merge/upstream changes
6723b6c Merging, upstream http://cl/182836545
bbb17ad more code merge
f1c87ad merges, cl/155419551 and other
9bc8666 more merging
a0435a5 merging
8d707df code merge
b1623e9 Adding python tests to Bazel build file.
8e86221 Use fully qualified  in examples
354fc8d Document ScopedTrace utility
ba99a04 Check whether _MSC_VER is defined when detecting presence of cxxabi.h under libc++.
9c82e77 Expose ScopedTrace utility in public interface
08b323f Reverting some changes, need to make the merge compile
9195571 Reverting some changes, need to make the merge compile
6d04de7 Reverting some changes, need to make the merge compile
b9e2978 Reverting some changes, need to make the merge compile
304be8f Test files for corresponding changes
6befe42 Test files for corresponding changes
f45c22c Test files for corresponding changes
5f4ce9d Test files for corresponding changes
d629744 More code merges
da1f7fe Code merging
33d73d4 Added support for WINAPI_PARTITION_TV_TITLE which is defined on XboxOne
569d713 Added support for WINAPI_PARTITION_TV_TITLE which is defined on XboxOne
93b7798 continue upstream/merge, etc
ed8d02c Update .travis.yml
73d1251 Update .travis.yml
cfd29e0 Update .travis.yml
29f94e0 Update .travis.yml
2982dc1 Trying to fix travis
6914ae2 Upstream cl 103120214
1d757db More merge, cleanup
481fe94 More merge, cleanup
6a26e47 Code merge, upstreaming accumulated changes, cleanup
62dbaa2 revert
d630a8b code merges, cleanup
f33902b revert googletest/test/gtest-param-test_test.cc
6eccdb7 Update .travis.yml
d237297 code merge, cleanups
2ad5661 Upstream of cl 129104714
5eecadf Revert one file
9fce984 wip, cleanups/merge
258fd6e cleanup, merge
cbd15d4 [Bazel] Detect Windows with cpu value x64_windows and x64_windows_msvc
91ba05c Small cleanups, merge
67d6e46 Use correct name for build event types.
67476c1 Revert one file for now
adfdc65 Fixed test for pull request.
d3acb4b Fixed output and test for 'enabled_on_pr'
19b5774 code cleanup in preparation for merges, cl 180857299
9cee677 Optimize build matrix (#1)
1c09831 upstreaming cl 124976692
1acf8c7 Also define GTEST_ATTRIBUTE_PRINTF_ in clang-cl.
b3d9be5 Pass the -Wmissing-declarations warning.
e7734fb OSS Sync, cl 163329677
90244a6 Fix testing::Combine on MSVC 2017.
bcd3552 Avoid warning C4619 in MSVC 2017.
ec2b0c3 Build both googletest and googlemock.
75b85d5 Create a autotools-based build for Travis.
7990f56 Re-enable MSVC++ C4389 warning in CmdHelperEq()
e17907d Update internal_utils.cmake
a7fceb4 Update gtest-param-test.h.pump
8a48f0e Update gtest-param-test.h.pump
23a014a Refactor docs about contributions to CONTRIBUTING.md.
74a5306 remove extra line
3ea0631 remove implicit casts
c82cd5e Also add documentation around becoming a contributor.
1184117 Wrong LICENSE file, sorry.  Corrected. [skip ci]
bc3320b Implement bazel-based builds in Travis.
e22d344 Add Apache-2.0 LICENSE file.
cf3adad Add licenses() directive for googlemock/tests.
57bb0bb Remove C4996 warning in VS2017
3464f76 Improved description of VS std::tuple support
8d9d6bb Improved description of VS std::tuple support
4aa05bd Only switch to g++-4.9 on Linux.
aea8580 Run autoconf from top-level directory.
0663ce9 Fix double free when building Gtest/GMock in shared libraries and linking a test executable with both.
f46bd00 make includes system
a7269e2 replaced back accidently removed static_cast with consistent ImplicitCast_
82447f2 Fixes issue #826 by treating MinGW as "non-Windows" when determining colored output
1ae4096 fix for VS2017 deprecation of ::tr1::tuple change static_cast to ImplicitCast_ for consitency fixes for building with path names containing spaces
aa0b545 remove GTEST_HAS_PARAM_TESTS
4d26df7 Speed up printing of characters which need hex escaping
99d0ef3 Also can build when included in source.
9538687 Remove trailing whitespaces in BUILD.bazel
c113a71 Added support for WINAPI_PARTITION_TV_TITLE which is defined on XboxOne
ca6a70c Pass MSVC's C4826 warning.


Bug: crashpad:196
Change-Id: I60be5750667d1901e0ad47c3558de1338b083536
Reviewed-on: https://chromium-review.googlesource.com/1069562
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-05-22 21:01:08 +00:00
Joshua Peraza
ef6d91b166 Update cpp-httplib to 37130cd
Also exclude http_transport_test_server from Android where it doesn't
build.

Change-Id: I51cc3f50e4fb9db982d91b2924b8ea87d86926d4
Reviewed-on: https://chromium-review.googlesource.com/1054160
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
2018-05-11 15:32:35 +00:00
Scott Graham
439ba730c5 Implementation in C++ of HTTPTransport test server
- Pulls in cpp-httplib for test-only usage in third_party/.
- Replaces http_transport_test_server.py with .cc server.
- Remove unnecessary Go toolchain pull. This was planned to be used for
  the test server, but the toolchain integration was too messy when
  covering all target platforms/configs.

Bug: crashpad:196, crashpad:227, crashpad:30
Change-Id: I5990781473dcadfcc036fbe711c02928638ff851
Reviewed-on: https://chromium-review.googlesource.com/1013293
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-04-20 20:56:49 +00:00
Joshua Peraza
8175825f45 win: use version.lib instead of mincore.lib
Also enable wd4702: unreachable code for zlib and gtest.

Change-Id: Ie1603b16e96f29b6ac82a1122c5ab5a8942eef24
Reviewed-on: https://chromium-review.googlesource.com/955895
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2018-03-09 21:26:03 +00:00
Scott Graham
cd3afe616e Linux: Pull and use clang toolchain in third_party
Includes mini_chromium update including one change:
b4128fb Linux GN: support override of clang to different path

Complementary bot change at
https://chromium-review.googlesource.com/c/chromium/tools/build/+/935668.

Bug: crashpad:79, crashpad:220
Change-Id: I9228bf6786d94c34265e933e21e45a899816bb52
Reviewed-on: https://chromium-review.googlesource.com/935470
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-02-23 22:35:59 +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
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
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
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
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
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
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
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
Mark Mentovai
3650d56570 gn: Build gtest and gmock tests
Bug: crashpad:79
Change-Id: Iea78fcb6a758f57d2b550b214b947ca5aabad036
Reviewed-on: https://chromium-review.googlesource.com/827732
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2017-12-15 23:10:52 +00:00
Mark Mentovai
8742051c60 mac: Drop apple_cctools and getsectiondata()/getsegmentdata() wrappers
These are present on 10.7 and later, and were only provided for the
benefit of older systems that probably aren’t relevant to Crashpad any
longer.

Change-Id: If9d7222f7af05020d0ff57d5d9ed06355fa14a48
Reviewed-on: https://chromium-review.googlesource.com/827686
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2017-12-15 23:05:54 +00:00
Scott Graham
00e6bd0887 fuchsia: Get 'all' to build
Adds a zlib build file for when building standalone (rather than reusing
Chromium's, though the code still Chromium's patched copy). The separate
build file avoids including the code for minizip and other support
targets (instead, only the main libzlib.a static_library is defined).
The other libraries and executables won't build in the Crashpad repo, so
having a local build file means that all targets defined in the GN build
are buildable.

generate_dump is passing an invalid handle to ProcessSnapshotFuchsia as
there's not yet any utility to convert a pid to a handle. But that's no
great loss, because ProcessSnapshotFuchsia doesn't do anything itself
yet.

Bug: crashpad:79, crashpad:196
Change-Id: I11c918a30b60cc071465c919315b45caab1de870
Reviewed-on: https://chromium-review.googlesource.com/809354
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-12-08 19:50:39 +00:00
Mark Mentovai
612237a032 android: Fix 32-bit test to build at API [21, 24) with unified headers
Although API 21 introduced support for 64-bit off_t in many system calls
or their wrappers, <stdio.h> support for 64-bit off_t is absent until
API 24.

This is a partial revert of 5969d6b1eb22, because with this more
targeted fix applying only to gtest, the rest of Crashpad will work with
a 64-bit off_t even at API levels lacking NDK support by going through
the mmap() shim in compat.

This includes a mini_chromium update to 96e32dd499a4.

85cbec19ffc0 fuchsia: Make EINTR macros no-ops
fbf410cd4d40 fuchsia: Use koid instead of getpid() for process field in
             logging
96e32dd499a4 Revert "android: Don’t use _FILE_OFFSET_BITS=64 until API
             21"

Bug: crashpad:211
Change-Id: I34c3c8b42eb315605e6775962b44c3c4573b7462
Reviewed-on: https://chromium-review.googlesource.com/811204
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2017-12-06 18:05:37 +00:00
Scott Graham
eeb31321f7 gn, fuchsia: Add //testing forwarding and GN build file
third_party/gtest/BUILD.gn mostly written by rsesek.

Also includes DEPS roll of mini_chromium for Wexit_time_destructors config.

$ git log --oneline dd0c3e96..fa146c12
fa146c1 (HEAD, origin/master, origin/HEAD) gn: Extract Wexit-time-destructors into separate config
95bfddb fuchsia: Fix base::RandBytes() after 5a1c5f82ce75
b79608a fuchsia: Use llvm-ar from the Fuchsia clang package
c34725b fuchsia: Look for the toolchain and SDK in per-build-host directories
e8e1ee4 fuchsia: Don't assume that kernel will provide all requested rand bytes
5a1c5f8 fuchsia: Implement RandBytes()
df359ca fuchsia: Enable -fPIC
bd50c95 Restore accidentally changed license
a70db15 Improvements to GN build config
7de4d23 fuchsia: Fix compile of base/logging.cc
25a8b57 Add link GN rules to non-win build, set c++14 in CC flags.
7d15806 fuchsia: The very basics of compiling mini_chromium/base with GN

Bug: crashpad:79, crashpad:196
Change-Id: I3e741f185b028a96705eefc1f993037830d97448
Reviewed-on: https://chromium-review.googlesource.com/797414
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2017-11-30 20:58:46 +00:00
Scott Graham
3f5c939c84 gn: Next step in getting compilation working
- Correctly sets target_cpu and current_cpu so correct toolchain
  can be used on Fuchsia.
- Introduces GN argument "crashpad_in_chromium" which defaults to
  false. Used to set CRASHPAD_IN_CHROMIUM define, determine which
  zlib path to use, and how to package the test targets into
  binaries (one big one in Chromium, separate in Crashpad).

Bug: crashpad:79, crashpad:196
Change-Id: If6560dc064308ed6f8bf7c75cf74f684a3522e8b
Reviewed-on: https://chromium-review.googlesource.com/797354
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-29 19:46:08 +00:00
Mark Mentovai
5e16410ad4 fuchsia: Download the toolchain to distinct directories per build host
I like to share a single Crashpad checkout between my non-virtual
machine and some virtual machines. Downloaded toolchains, which vary by
build host configuration, must go in paths named for the build host.
(Chromium doesn’t do this, and it bugs me.)

Rather than downloading the Fuchsia toolchain to
third_party/fuchsia/clang, this puts it in
third_party/fuchsia/clang/{mac,linux}-amd64.

The Fuchsia SDK is only published on cipd for linux-amd64, but the
sysroot that it contains ought to be perfectly functional on any
suitably-equipped build host, so this also checks out that package
unconditionally.

Bug: crashpad:196
Change-Id: Iabd4f2dd1e2c06a3f7208b5c40432619983919ea
Reviewed-on: https://chromium-review.googlesource.com/794537
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2017-11-29 15:19:17 +00:00
Scott Graham
4ee20f5831 Add Fuchsia clang and sdk to DEPS
These use CIPD (from depot_tools) to download packages created by the
Fuchsia team. The .ensure file is passed to `cipd` which currently
include specificiations for the Fuchsia team's build of clang (which,
because it's close to HEAD includes support for targeting Fuchsia), as
well as the Fuchsia SDK.

Both packages are specified as "latest" rather than pinning to a
specific revision. At this early point in the process we don't have any
good reason to pin, but that can be accomplished later by replacing that
with a specific package's SHA1.

Due to the (relatively new) 'condition': 'checkout_fuchsia', this DEPS
step will only be run when .gclient includes 'fuchsia' in the target_os
block at the top_level, e.g.

$ cat .gclient
solutions = [
  { ...  },
]
target_os = ['fuchsia']

Bug: crashpad:196, crashpad:209
Change-Id: Id6d444a1c4450ffde8ee6665ff9720ce454c5cdf
Reviewed-on: https://chromium-review.googlesource.com/786092
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-11-27 21:42:44 +00:00
Mark Mentovai
20e5aba1af URL cleanups: switch to HTTPS, fix dead ones, use canonical ones
Change-Id: I4b247d7fae1a212350f8ffcf2bf5ba1fa730f5c1
Reviewed-on: https://chromium-review.googlesource.com/780339
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2017-11-20 22:23:39 +00:00
Scott Graham
d5ead4d70f Upstream lightly modified Chromium BUILD.gn files
Unreferenced, and not working at all in Crashpad-standalone.

Copied from Chromium at 52a9831d81f2099ef9f50fcdaca5853019262c35 to have
a point where a roll back into Chromium should be a no-op (with Chromium's
build/secondary/third_party/crashpad/... removed).

I'm not sure what we want to do about the various gni references into
Chromium (e.g. //build/config/sanitizers/sanitizers.gni, //testing/test.gni,
etc.) but I guess the sooner they live in Crashpad rather than in Chromium
the sooner we can figure out the sort of knobs and dials we need.

Bug: crashpad:79
Change-Id: Id99c29123bcd4174ee2bcc128c2be87e3c94fa3f
Reviewed-on: https://chromium-review.googlesource.com/777819
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-20 18:08:23 +00:00
Mark Mentovai
3d6f7bcf90 Enable x86 optimizations for zlib
These were intended to be enabled previously, but GYP uses “ia32” and
“x64” for x86 and x86_64, and zlib.gyp erroneously used “x86” and
“amd64” instead.

In order to make this work, gcc and clang need -mpclmul to enable the
pclmul extension used by crc_folding.c. The optimized code will only be
used if, at runtime, SSE2, SSE4.2, and PCLMULQDQ support is detected.

Change-Id: Ic709cd2a6c38892083c44c4004573a64b3581eb5
Reviewed-on: https://chromium-review.googlesource.com/553337
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2017-06-28 20:20:36 +00:00
Mark Mentovai
76a67a37b1 Add the --monitor-self argument to crashpad_handler
https://crbug.com/678959 added “fallback” crash reporting for
crashpad_handler on Windows, in a Chrome- and Windows-specific way. This
implements a more general self-monitor mechanism that will work on
multiple platforms and in the absence of Chrome.

When starting crashpad_handler (let’s call it the “first instance”) with
--monitor-self, it will start another crashpad_handler (the “second
instance”). The second instance monitors the first one for crashes. The
second instance will be started in mostly the same way as the first
instance, except --monitor-self will not be provided to the second
instance.

Bug: crashpad:143
Change-Id: I76f3f47d1762d8ecae1814357cb672c8b7bd5e95
Reviewed-on: https://chromium-review.googlesource.com/466267
Reviewed-by: Sigurður Ásgeirsson <siggi@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2017-04-04 15:30:36 +00:00
Mark Mentovai
cca10659c7 android: Fix gmock-using tests’ use of MOCK_METHODn() with clang
This was already addressed by disabling a warning, but was only
effective for macOS and non-Android Linux. The comment for the existing
fix, which is now being applied to Android:

> The MOCK_METHODn() macros do not specify “override”, which triggers
> this warning in users: “error: 'Method' overrides a member function
> but is not marked 'override'
> [-Werror,-Winconsistent-missing-override]”.  Suppress these warnings,
> and add -Wno-unknown-warning-option because only recent versions of
> clang (trunk r220703 and later, version 3.6 and later) recognize it.

Also see https://crbug.com/428099.

The errors being encountered since 3983b80ca2fc were:

util/file/file_reader_test.cc:48:23: error: 'Read' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
  FileOperationResult Read(void* data, size_t size) {
                      ^
util/file/file_reader.h:39:31: note: overridden virtual function is here
  virtual FileOperationResult Read(void* data, size_t size) = 0;
                              ^
util/file/file_reader_test.cc:53:16: error: 'Seek' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
  MOCK_METHOD2(Seek, FileOffset(FileOffset, int));
               ^
util/file/file_seeker.h:31:22: note: overridden virtual function is here
  virtual FileOffset Seek(FileOffset offset, int whence) = 0;
                     ^

Bug: crashpad:30
Test: crashpad_util_test FileReader.*
Change-Id: I10894efdafc0da965e3780219f2e4c1f13f9b99e
Reviewed-on: https://chromium-review.googlesource.com/458060
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2017-03-22 23:49:31 +00:00
Mark Mentovai
4c6f6e52e2 Remove vestigial support for in-Chromium GYP build
Chromium’s GYP build has been removed. The support added to Crashpad’s
GYP build to integrate with Chromium’s is now unused and unnecessary.
Chromium builds Crashpad as part of its own GN build.

https://groups.google.com/a/chromium.org/d/topic/chromium-dev/NZkPr-CXvQ0

Change-Id: I30f2d3453f4476037c9afe0714a780456f0bbcd6
Reviewed-on: https://chromium-review.googlesource.com/444044
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2017-02-16 18:33:54 +00:00
Mark Mentovai
0c322ecc3f Use zlib to gzip-compress uploads
This adds zlib to Crashpad. By default in standalone Crashpad builds,
the system zlib will be used where available. A copy of Chromium’s zlib
(currently a slightly patched 1.2.11) is checked out via DEPS into
third_party for use on Windows, which does not have a system zlib.

zlib is used to produce gzip streams for HTTP upload request bodies sent
by crashpad_handler by default. The Content-Encoding: gzip header is set
for these compressed request bodies. Compression can be disabled for
upload to servers without corresponding decompression support by
starting crashpad_handler with the --no-upload-gzip option.

Most minidumps compress quite well with zlib. A size reduction of 90% is
not uncommon.

BUG=crashpad:157
TEST=crashpad_util_test GzipHTTPBodyStream.*:HTTPTransport.*

Change-Id: I99b86db3952c3685cd78f5dc858a60b54399c513
Reviewed-on: https://chromium-review.googlesource.com/438585
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2017-02-16 16:26:19 +00:00
Mark Mentovai
952f787f4a doc: Standardize on “macOS” in comments
Use “macOS” as the generic unversioned name of the operating system in
comments. For version-specific references, use Mac OS X through 10.6, OS
X from 10.7 through 10.11, and macOS for 10.12.

Change-Id: I1ebee64fbf79200bc799d4a351725dd73257b54d
Reviewed-on: https://chromium-review.googlesource.com/408269
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2016-11-08 19:21:44 +00:00
Scott Graham
56b14bceef win getopt: memcmp() -> strncmp() for ASan
R=mark@chromium.org
BUG=chromium:635990

Change-Id: I69f0e1f0f48c6d0d2ac26eb395df7add2907d02b
Reviewed-on: https://chromium-review.googlesource.com/367350
Reviewed-by: Mark Mentovai <mark@chromium.org>
2016-08-10 20:34:10 +00:00
Mark Mentovai
e18f6a6e66 Nest crashpad and mini_chromum deeper in the external-dependencies build
crashpad and mini_chromium both have top-level “build” directories.
These would conflict with top-level “BUILD” files in google3 when
checked out on a case-sensitive filesystem. Although Crashpad’s “build”
directory can be moved easily, mini_chromium’s matches Chromium’s, which
is much more difficult to move. “build” is also the best and most
obvious name for these directories.

To avoid this problem, in the external-dependencies build, crashpad and
mini_chromium are placed one level deeper, just as crashpad is in
Chromium, and mini_chromium is in the standalone Crashpad build. This
allows true pristine unmodified copies to be checked in to google3,
without comingling locally-added files such as BUILD with external
source.

The directory structure adopted for the external-dependencies build is
now

      root/crashpad/crashpad[/README]
      root/gmock[/include/gmock/gmock.h]
      root/gtest[/include/gtest/gtest.h]
      root/gyp[/pylib/gyp]
      root/mini_chromium/mini_chromium[/build/common.gypi]

Change-Id: Idbc8f1b0d87da0cbceab3c15e059e839c1fb6a3f
Reviewed-on: https://chromium-review.googlesource.com/323991
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2016-01-27 21:59:50 +00:00
Mark Mentovai
88eea80ad3 Add an “external” mode for obtaining dependencies
This augments the standalone and in-Chromium models with an external
model, in which the dependencies and Crashpad are checked out as
siblings in the same directory, organized according to this structure:

  root/crashpad[/README]
  root/gmock[/include/gmock/gmock.h]
  root/gtest[/include/gtest/gtest.h]
  root/gyp[/pylib/gyp]
  root/mini_chromium[/build/common.gypi]

This is the directory structure used in google3.

Change-Id: Ie300ead7cd085265933e4ed891509ce050e995e2
Reviewed-on: https://chromium-review.googlesource.com/324230
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2016-01-27 21:13:28 +00:00
Scott Graham
7a7d66ca89 win: Compile getopt as C++ and wrap in crashpad namespace
All our Main()s are in namespace crashpad already, so this just works.

R=mark@chromium.org
BUG=crashpad:76

Review URL: https://codereview.chromium.org/1439113002 .
2015-11-12 14:10:24 -08:00
Mark Mentovai
6e89d45d7d Switch googletest and googlemock to pull from the GitHub git repository
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/1404033002 .
2015-11-11 11:13:37 -05:00
Marc-Antoine Courteau
7858145558 Update paths in third_party to use DEPTH instead of relative paths.
R=mark@chromium.org

Review URL: https://codereview.chromium.org/1428973002 .

Patch from Marc-Antoine Courteau <macourteau@chromium.org>.
2015-10-30 11:37:15 -04:00
Mark Mentovai
cd0e25f1ba Update all URLs to point to https://crashpad.chromium.org/
All other links to code.google.com and googlecode.com are fixed to point
to their proper new homes as well.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1414243005 .
2015-10-29 18:31:20 -04:00
Scott Graham
5b9c936403 Copy copyright to header of .h and .c for checklicenses
licensecheck.pl now prints

third_party\getopt\getopt.h: *No copyright* Public domain

for both .c and .h, rather than UNKNOWN.

R=mark@chromium.org

Review URL: https://codereview.chromium.org/1128893004
2015-05-06 15:35:07 -07:00
Scott Graham
910a3cadc7 Copy copyright to header of .h and .c for checklicenses
licensecheck.pl now prints

third_party\getopt\getopt.h: *No copyright* Public domain

for both .c and .h, rather than UNKNOWN.

R=mark@chromium.org

Review URL: https://codereview.chromium.org/1128893004
2015-05-06 15:33:45 -07:00
Scott Graham
17b770ece4 win: get tools/crashpad_database_util mostly working
- Add public domain getopt implementation to third_party.
- Add timegm to compat/win.
- Add stub of strptime to compat/win.

Requires https://codereview.chromium.org/1119173003/ and
https://codereview.chromium.org/1117013006/.

Rather than working in wchar_t everywhere on Windows, convert
UTF16 command line arguments in wmain to UTF8, work primarily
in UTF8, and convert back when necessary to UTF16 for base::FilePath.
This avoids the need to genericize over all the standard C string
functions, getopt, etc. while still handling non-ASCII properly.

R=mark@chromium.org
BUG=crashpad:1

Review URL: https://codereview.chromium.org/1119783005
2015-05-06 10:28:07 -07:00
Robert Sesek
f0ee5f0efe Remove NSInputStream used in HTTPTransportMac and use a CFReadStream instead.
NSInputStream requires overriding and implementing private methods in order to
use it with NSURLConnection [1]. It is cleaner to use the private but stable
and open source CFStreamAbstract.h header from CF-Lite to implement a
CFReadStream. Since CFReadStream is toll-free bridged to NSInputStream, the
remainder of the HTTPTransport code can remain unchanged.

[1] http://lists.apple.com/archives/macnetworkprog/2007/May/msg00055.html

BUG=crashpad:15
R=mark@chromium.org

Review URL: https://codereview.chromium.org/993413003
2015-03-11 16:59:59 -04:00
Mark Mentovai
b665a0db07 Allow Crashpad to build in the Chromium tree.
When building in the Chromium tree, this swaps out Crashpad’s copies of
mini_chromium, gtest, and gmock for the equivalents provided by
Chromium. A GYP variable, crashpad_in_chromium, is used to determine the
behavior.

gclient doesn’t sync sub-DEPS, so when doing an in-Chromium build,
Crashpad’s copies of mini_chromium, gtest, and gmock are not available.

BUG=crashpad:12
R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/986033002
2015-03-09 15:25:42 -04:00
Mark Mentovai
db7a933d95 gtest, gmock: disable incompatible warnings.
gtest and gmock both rely heavily on exit-time destructors, and must
build with -Wno-exit-time-destructors to avoid these warnings.

gmock’s MOCK_METHODn() macros violate
-Wno-inconsistent-missing-override, so this warning is disabled for
direct dependents of gmock.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/984393002
2015-03-08 21:04:49 -04:00
Mark Mentovai
ab4978b51e 10.6 SDK compatibility.
TEST=util_test MachOImageReader.* (and all others with a 10.6 SDK build)
R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/561933004
2014-09-12 12:13:27 -04:00
Mark Mentovai
24fc801715 Add third_party/apple_cctools containing virgin upstream code.
getsectionbyname() and getsegmentbyname() do not exist prior to Mac OS X
10.7. These functions are used by util_test MachOImageReader.*. For 10.6
SDK and runtime compatibility, Crashpad needs its own implementations of
these functions.

This checkin contains unmodified copies of the upstream code. A
subsequent checkin will contain the local modifications, which will trim
out all unnecessary portions. This is being committed in two parts to
make it easier to see what changes are being made to the upstream files.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/564853002
2014-09-11 15:11:50 -04:00
Mark Mentovai
fbcd680b50 Initial commit of Crashpad.
This commit contains the basic structure of the project:
 - LICENSE and related files.
 - DEPS to check dependencies out into third_party.
 - README.crashpad files and .gyp files to accompany third_party
   dependencies.
 - Infrastructure to run GYP as a gclient hook.
 - codereview.settings to enable Rietveld code review.
 - Assorted other administrative and dot-files.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/426403002
2014-07-30 23:24:58 -04:00