diff --git a/DEPS b/DEPS index 93c4912c..957ae42a 100644 --- a/DEPS +++ b/DEPS @@ -34,15 +34,12 @@ deps = { 'crashpad/third_party/googletest/googletest': Var('chromium_git') + '/external/github.com/google/googletest@' + '11da093e0477185dbd78abaaa9f99db15be498d0', - 'crashpad/third_party/gyp/gyp': - Var('chromium_git') + '/external/gyp@' + - '8bee09f4a57807136593ddc906b0b213c21f9014', 'crashpad/third_party/lss/lss': Var('chromium_git') + '/linux-syscall-support.git@' + '7bde79cc274d06451bf65ae82c012a5d3e476b5a', 'crashpad/third_party/mini_chromium/mini_chromium': Var('chromium_git') + '/chromium/mini_chromium@' + - '9cdc2a7c8415bd880757d2f564edf363f0218fe1', + 'f9ae4322dfc5bcc14cc82d6005107f3b75ca2059', 'crashpad/third_party/libfuzzer/src': Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git@' + 'fda403cf93ecb8792cb1d061564d89a6553ca020', diff --git a/build/crashpad.gypi b/build/crashpad.gypi deleted file mode 100644 index 2accb5a0..00000000 --- a/build/crashpad.gypi +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 2015 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'variables': { - # When building as a part of Chromium, this variable sets up the build to - # treat Crashpad as Chromium code. This enables warnings at an appropriate - # level and applies Chromium’s build/filename_rules.gypi. In a standalone - # build, this variable has no effect. - 'chromium_code': 1, - }, - 'target_defaults': { - 'msvs_disabled_warnings': [ - 4201, # nonstandard extension used : nameless struct/union. - 4324, # structure was padded due to __declspec(align()). - ], - 'conditions': [ - ['OS=="linux" or OS=="android"', { - 'conditions': [ - ['clang==0', { - 'cflags': [ - '-Wno-multichar', - ], - }], - ], - }], - ['OS=="android"', { - 'ldflags': [ - '-static-libstdc++', - ], - }], - ], - }, -} diff --git a/build/crashpad_dependencies.gypi b/build/crashpad_dependencies.gypi deleted file mode 100644 index 5bae11af..00000000 --- a/build/crashpad_dependencies.gypi +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2015 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - # Crashpad’s GYP build can obtain dependencies in two different ways, directed - # by the crashpad_standalone GYP variable. It may have these values: - # standalone - # A “standalone” Crashpad build, where the dependencies are in the - # Crashpad tree. third_party/mini_chromium and third_party/googletest - # provide the base and Google Test libraries. - # external - # A build with external dependencies. mini_chromium provides the base - # library, but it’s located outside of the Crashpad tree, as is Google - # Test. - # - # In order for Crashpad’s .gyp files to reference the correct versions - # depending on how dependencies are being provided, include this .gypi file - # and reference the crashpad_dependencies variable. - # - # Note that Crashpad’s in-Chromium build uses GN instead of GYP, and - # Chromium’s GN build configures Crashpad to use Chromium’s own base library - # and its copy of the Google Test library. - - 'variables': { - # When with external dependencies, build/gyp_crashpad.py sets - # crashpad_dependencies to "external", and this % assignment will not - # override it. - 'crashpad_dependencies%': 'standalone', - }, -} diff --git a/build/gyp_crashpad.py b/build/gyp_crashpad.py deleted file mode 100755 index 41ab4b94..00000000 --- a/build/gyp_crashpad.py +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os -import sys - - -def ChooseDependencyPath(local_path, external_path): - """Chooses between a dependency located at local path and an external path. - - The local path, used in standalone builds, is preferred. If it is not - present but the external path is, the external path will be used. If neither - path is present, the local path will be used, so that error messages - uniformly refer to the local path. - - Args: - local_path: The preferred local path to use for a standalone build. - external_path: The external path to fall back to. - - Returns: - A 2-tuple. The first element is None or 'external', depending on whether - local_path or external_path was chosen. The second element is the chosen - path. - """ - if os.path.exists(local_path) or not os.path.exists(external_path): - return (None, local_path) - return ('external', external_path) - - -script_dir = os.path.dirname(__file__) -crashpad_dir = (os.path.dirname(script_dir) - if script_dir not in ('', os.curdir) else os.pardir) - -sys.path.insert( - 0, - ChooseDependencyPath( - os.path.join(crashpad_dir, 'third_party', 'gyp', 'gyp', 'pylib'), - os.path.join(crashpad_dir, os.pardir, os.pardir, 'gyp', 'pylib'))[1]) - -import gyp - - -def main(args): - if 'GYP_GENERATORS' not in os.environ: - os.environ['GYP_GENERATORS'] = 'ninja' - - crashpad_dir_or_dot = crashpad_dir if crashpad_dir is not '' else os.curdir - - (dependencies, mini_chromium_common_gypi) = (ChooseDependencyPath( - os.path.join(crashpad_dir, 'third_party', 'mini_chromium', - 'mini_chromium', 'build', 'common.gypi'), - os.path.join(crashpad_dir, os.pardir, os.pardir, 'mini_chromium', - 'mini_chromium', 'build', 'common.gypi'))) - if dependencies is not None: - args.extend(['-D', 'crashpad_dependencies=%s' % dependencies]) - args.extend(['--include', mini_chromium_common_gypi]) - args.extend(['--depth', crashpad_dir_or_dot]) - args.append(os.path.join(crashpad_dir, 'crashpad.gyp')) - - result = gyp.main(args) - if result != 0: - return result - - if sys.platform == 'win32': - # Check to make sure that no target_arch was specified. target_arch may - # be set during a cross build, such as a cross build for Android. - has_target_arch = False - for arg_index in range(0, len(args)): - arg = args[arg_index] - if (arg.startswith('-Dtarget_arch=') or - (arg == '-D' and arg_index + 1 < len(args) and - args[arg_index + 1].startswith('target_arch='))): - has_target_arch = True - break - - if not has_target_arch: - # Also generate the x86 build. - result = gyp.main(args + - ['-D', 'target_arch=ia32', '-G', 'config=Debug']) - if result != 0: - return result - result = gyp.main( - args + ['-D', 'target_arch=ia32', '-G', 'config=Release']) - - return result - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/build/gyp_crashpad_android.py b/build/gyp_crashpad_android.py deleted file mode 100755 index baeadf90..00000000 --- a/build/gyp_crashpad_android.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2017 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import argparse -import glob -import gyp_crashpad -import os -import re -import subprocess -import sys - - -def main(args): - parser = argparse.ArgumentParser( - description='Set up an Android cross build', - epilog='Additional arguments will be passed to gyp_crashpad.py.') - parser.add_argument('--arch', required=True, help='Target architecture') - parser.add_argument('--api-level', required=True, help='Target API level') - parser.add_argument('--ndk', required=True, help='Standalone NDK toolchain') - (parsed, extra_command_line_args) = parser.parse_known_args(args) - - SYS_PLATFORM_TO_NDK_HOST_ARCH = { - 'cygwin': 'windows-x86_64', - 'darwin': 'darwin-x86_64', - 'linux': 'linux-x86_64', - 'linux2': 'linux-x86_64', - 'darwin': 'darwin-x86_64', - 'win32': 'windows-x86_64', - } - - ndk_host_arch = SYS_PLATFORM_TO_NDK_HOST_ARCH[sys.platform] - - ndk_bin_dir = os.path.join(parsed.ndk, 'toolchains', 'llvm', 'prebuilt', - ndk_host_arch, 'bin') - if not os.path.exists(ndk_bin_dir): - parser.error("missing toolchain") - - ARCH_TO_ARCH_TRIPLET = { - 'arm': 'armv7a-linux-androideabi', - 'arm64': 'aarch64-linux-android', - 'ia32': 'i686-linux-android', - 'x64': 'x86_64-linux-android', - } - - clang_prefix = ARCH_TO_ARCH_TRIPLET[parsed.arch] + parsed.api_level - os.environ['CC_target'] = os.path.join(ndk_bin_dir, clang_prefix + '-clang') - os.environ['CXX_target'] = os.path.join(ndk_bin_dir, - clang_prefix + '-clang++') - - extra_args = ['-D', 'android_api_level=' + parsed.api_level] - - # ARM only includes 'v7a' in the tool prefix for clang - tool_prefix = ('arm-linux-androideabi' if parsed.arch == 'arm' else - ARCH_TO_ARCH_TRIPLET[parsed.arch]) - - for tool in ('ar', 'nm', 'readelf'): - os.environ['%s_target' % tool.upper()] = (os.path.join( - ndk_bin_dir, '%s-%s' % (tool_prefix, tool))) - - return gyp_crashpad.main([ - '-D', 'OS=android', '-D', - 'target_arch=%s' % parsed.arch, '-D', 'clang=1', '-f', 'ninja-android' - ] + extra_args + extra_command_line_args) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/client/client.gyp b/client/client.gyp deleted file mode 100644 index dcb2d0eb..00000000 --- a/client/client.gyp +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../build/crashpad.gypi', - ], - 'targets': [ - { - 'target_name': 'crashpad_client', - 'type': 'static_library', - 'dependencies': [ - '../compat/compat.gyp:crashpad_compat', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../third_party/lss/lss.gyp:lss', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'annotation.cc', - 'annotation.h', - 'annotation_list.cc', - 'annotation_list.h', - 'crash_report_database.cc', - 'crash_report_database.h', - 'crash_report_database_mac.mm', - 'crash_report_database_win.cc', - 'crashpad_client.h', - 'crashpad_client_linux.cc', - 'crashpad_client_mac.cc', - 'crashpad_client_win.cc', - 'crashpad_info.cc', - 'crashpad_info.h', - 'prune_crash_reports.cc', - 'prune_crash_reports.h', - 'settings.cc', - 'settings.h', - 'simple_string_dictionary.h', - 'simple_address_range_bag.h', - 'simulate_crash.h', - 'simulate_crash_linux.h', - 'simulate_crash_mac.cc', - 'simulate_crash_mac.h', - 'simulate_crash_win.h', - ], - 'conditions': [ - ['OS=="win"', { - 'link_settings': { - 'libraries': [ - '-lrpcrt4.lib', - ], - }, - }], - ['OS=="linux" or OS=="android"', { - 'sources': [ - 'client_argv_handling.cc', - 'client_argv_handling.h', - 'crashpad_info_note.S', - 'crash_report_database_generic.cc', - ], - }], - ], - 'target_conditions': [ - ['OS=="android"', { - 'sources/': [ - ['include', '^crashpad_client_linux\\.cc$'], - ['include', '^simulate_crash_linux\\.h$'], - ], - }], - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '..', - ], - }, - }, - ], -} diff --git a/client/client_test.gyp b/client/client_test.gyp deleted file mode 100644 index fefb8fc8..00000000 --- a/client/client_test.gyp +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../build/crashpad.gypi', - ], - 'targets': [ - { - 'target_name': 'crashpad_client_test', - 'type': 'executable', - 'dependencies': [ - 'client.gyp:crashpad_client', - '../compat/compat.gyp:crashpad_compat', - '../handler/handler.gyp:crashpad_handler', - '../snapshot/snapshot.gyp:crashpad_snapshot', - '../test/test.gyp:crashpad_googlemock_main', - '../test/test.gyp:crashpad_test', - '../third_party/googletest/googlemock.gyp:googlemock', - '../third_party/googletest/googletest.gyp:googletest', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'annotation_test.cc', - 'annotation_list_test.cc', - 'crash_report_database_test.cc', - 'crashpad_client_win_test.cc', - 'crashpad_client_linux_test.cc', - 'prune_crash_reports_test.cc', - 'settings_test.cc', - 'simple_address_range_bag_test.cc', - 'simple_string_dictionary_test.cc', - 'simulate_crash_mac_test.cc', - ], - 'conditions': [ - ['OS=="win"', { - 'dependencies': [ - '../handler/handler.gyp:crashpad_handler_console', - ], - }], - ], - 'target_conditions': [ - ['OS=="android"', { - 'sources/': [ - ['include', '^crashpad_client_linux_test\\.cc$'], - ], - }], - ], - }, - ], -} diff --git a/compat/compat.gyp b/compat/compat.gyp deleted file mode 100644 index 693f2c67..00000000 --- a/compat/compat.gyp +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../build/crashpad.gypi', - ], - 'targets': [ - { - 'target_name': 'crashpad_compat', - 'dependencies': [ - '../util/no_cfi_icall.gyp:no_cfi_icall', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'android/dlfcn_internal.cc', - 'android/dlfcn_internal.h', - 'android/elf.h', - 'android/linux/elf.h', - 'android/linux/prctl.h', - 'android/linux/ptrace.h', - 'android/sched.h', - 'android/sys/epoll.cc', - 'android/sys/epoll.h', - 'android/sys/mman.h', - 'android/sys/mman_mmap.cc', - 'android/sys/syscall.h', - 'android/sys/user.h', - 'linux/signal.h', - 'linux/sys/ptrace.h', - 'linux/sys/user.h', - 'mac/Availability.h', - 'mac/AvailabilityVersions.h', - 'mac/kern/exc_resource.h', - 'mac/mach/i386/thread_state.h', - 'mac/mach/mach.h', - 'mac/mach-o/loader.h', - 'mac/sys/resource.h', - 'non_mac/mach/mach.h', - 'non_win/dbghelp.h', - 'non_win/minwinbase.h', - 'non_win/timezoneapi.h', - 'non_win/verrsrc.h', - 'non_win/windows.h', - 'non_win/winnt.h', - 'win/getopt.h', - 'win/strings.cc', - 'win/strings.h', - 'win/sys/time.h', - 'win/sys/types.h', - 'win/time.cc', - 'win/time.h', - 'win/winbase.h', - 'win/winnt.h', - 'win/winternl.h', - ], - 'conditions': [ - ['OS=="mac"', { - 'type': 'none', - 'include_dirs': [ - 'mac', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'mac', - ], - }, - }, { - 'include_dirs': [ - 'non_mac', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'non_mac', - ], - }, - }], - ['OS=="win"', { - 'type': 'static_library', - 'include_dirs': [ - 'win', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'win', - ], - }, - 'dependencies': [ - '../third_party/getopt/getopt.gyp:getopt', - ], - }, { - 'include_dirs': [ - 'non_win', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'non_win', - ], - }, - }], - ['OS=="android"', { - 'type': 'static_library', - 'include_dirs': [ - 'android', - 'linux', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'android', - 'linux', - ], - }, - 'link_settings': { - 'libraries': [ - '-ldl', - ], - }, - }], - ['OS=="linux"', { - 'type': 'none', - 'include_dirs': [ - 'linux', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'linux', - ], - }, - }], - ], - }, - ], -} diff --git a/crashpad.gyp b/crashpad.gyp deleted file mode 100644 index f30a9df9..00000000 --- a/crashpad.gyp +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'targets': [ - { - 'target_name': 'All', - 'type': 'none', - 'dependencies': [ - 'client/client.gyp:*', - 'client/client_test.gyp:*', - 'compat/compat.gyp:*', - 'handler/handler.gyp:*', - 'handler/handler_test.gyp:*', - 'minidump/minidump.gyp:*', - 'minidump/minidump_test.gyp:*', - 'snapshot/snapshot.gyp:*', - 'snapshot/snapshot_test.gyp:*', - 'test/test.gyp:*', - 'test/test_test.gyp:*', - 'tools/tools.gyp:*', - 'util/util.gyp:*', - 'util/util_test.gyp:*', - ], - 'sources': [ - 'doc/support/crashpad.doxy.h', - 'package.h', - ], - 'conditions': [ - ['OS!="mac" and OS!="win"', { - 'suppress_wildcard': 1, - }], - ], - }, - ], -} diff --git a/doc/developing.md b/doc/developing.md index 835fb5a8..60c41553 100644 --- a/doc/developing.md +++ b/doc/developing.md @@ -150,29 +150,16 @@ system](https://developer.android.com/ndk/downloads/) and expand it to a suitable location. These instructions assume that it’s been expanded to `~/android-ndk-r21b`. -Note that Chrome uses Android API level 21 for 64-bit platforms and 16 for +Note that Chrome uses Android API level 21 for both 64-bit platforms and 32-bit platforms. See Chrome’s [`build/config/android/config.gni`](https://chromium.googlesource.com/chromium/src/+/master/build/config/android/config.gni) which sets `android32_ndk_api_level` and `android64_ndk_api_level`. -To configure a Crashpad build for Android, use `gyp_crashpad_android.py`. This -script is a wrapper for `gyp_crashpad.py` that sets several environment -variables directing the build to the toolchain, and several GYP options to -identify an Android build. This must be done after any `gclient sync`, or -instead of any `gclient runhooks` operation. - +Set these gn args ``` -$ cd ~/crashpad/crashpad -python build/gyp_crashpad_android.py \ - --ndk ~/android-ndk-r21b --arch arm64 --api-level 21 \ - --generator-output out/android_arm64_api21 \ -``` - -To build, direct `ninja` to the specific `out` directory chosen by the -`--generator-output` argument to `gyp_crashpad_android.py`. - -``` -$ ninja -C out/android_arm64_api21/out/Debug all +target_os = "android" +android_ndk_root = ~/android-ndk-r21b +android_api_level = 21 ``` ## Testing diff --git a/handler/handler.gyp b/handler/handler.gyp deleted file mode 100644 index f8313a53..00000000 --- a/handler/handler.gyp +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../build/crashpad.gypi', - ], - 'targets': [ - { - # This target exists so that the crashpad_handler can be embedded into - # another binary. - 'target_name': 'crashpad_handler_lib', - 'type': 'static_library', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../compat/compat.gyp:crashpad_compat', - '../minidump/minidump.gyp:crashpad_minidump', - '../snapshot/snapshot.gyp:crashpad_snapshot', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../third_party/zlib/zlib.gyp:zlib', - '../tools/tools.gyp:crashpad_tool_support', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'crash_report_upload_thread.cc', - 'crash_report_upload_thread.h', - 'handler_main.cc', - 'handler_main.h', - 'linux/capture_snapshot.cc', - 'linux/capture_snapshot.h', - 'linux/crash_report_exception_handler.cc', - 'linux/crash_report_exception_handler.h', - 'linux/exception_handler_server.cc', - 'linux/exception_handler_server.h', - 'mac/crash_report_exception_handler.cc', - 'mac/crash_report_exception_handler.h', - 'mac/exception_handler_server.cc', - 'mac/exception_handler_server.h', - 'mac/file_limit_annotation.cc', - 'mac/file_limit_annotation.h', - 'minidump_to_upload_parameters.cc', - 'minidump_to_upload_parameters.h', - 'prune_crash_reports_thread.cc', - 'prune_crash_reports_thread.h', - 'user_stream_data_source.cc', - 'user_stream_data_source.h', - 'win/crash_report_exception_handler.cc', - 'win/crash_report_exception_handler.h', - ], - 'target_conditions': [ - ['OS=="android"', { - 'sources/': [ - ['include', '^linux/'], - ], - }], - ], - }, - { - 'target_name': 'crashpad_handler', - 'type': 'executable', - 'dependencies': [ - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../tools/tools.gyp:crashpad_tool_support', - 'crashpad_handler_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'main.cc', - ], - - 'conditions': [ - ['OS=="win"', { - 'msvs_settings': { - 'VCLinkerTool': { - 'SubSystem': '2', # /SUBSYSTEM:WINDOWS - }, - }, - }], - ], - }, - ], - 'conditions': [ - ['OS=="win"', { - 'targets': [ - { - # Duplicates crashpad_handler.exe to crashpad_handler.com and makes it - # a console app. - 'target_name': 'crashpad_handler_console', - 'type': 'none', - 'dependencies': [ - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../tools/tools.gyp:crashpad_tool_support', - 'crashpad_handler', - ], - 'actions': [ - { - 'action_name': 'copy handler exe to com', - 'inputs': [ - '<(PRODUCT_DIR)/crashpad_handler.exe', - ], - 'outputs': [ - '<(PRODUCT_DIR)/crashpad_handler.com', - ], - 'action': [ - 'copy <(PRODUCT_DIR)\crashpad_handler.exe ' - '<(PRODUCT_DIR)\crashpad_handler.com >nul && ' - 'editbin -nologo -subsystem:console ' - '<(PRODUCT_DIR)\crashpad_handler.com >nul', - ], - 'msvs_cygwin_shell': '0', - 'quote_cmd': '0', - }, - ], - }, - ], - }], - ], -} diff --git a/handler/handler_test.gyp b/handler/handler_test.gyp deleted file mode 100644 index 386ac294..00000000 --- a/handler/handler_test.gyp +++ /dev/null @@ -1,196 +0,0 @@ -# Copyright 2017 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../build/crashpad.gypi', - ], - 'targets': [ - { - 'target_name': 'crashpad_handler_test', - 'type': 'executable', - 'dependencies': [ - 'crashpad_handler_test_extended_handler', - 'handler.gyp:crashpad_handler_lib', - '../client/client.gyp:crashpad_client', - '../compat/compat.gyp:crashpad_compat', - '../snapshot/snapshot.gyp:crashpad_snapshot', - '../snapshot/snapshot_test.gyp:crashpad_snapshot_test_lib', - '../test/test.gyp:crashpad_googletest_main', - '../test/test.gyp:crashpad_test', - '../third_party/googletest/googletest.gyp:googletest', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'crashpad_handler_test.cc', - 'linux/exception_handler_server_test.cc', - 'minidump_to_upload_parameters_test.cc', - ], - 'conditions': [ - ['OS!="win"', { - 'dependencies!': [ - 'crashpad_handler_test_extended_handler', - ], - 'sources!': [ - 'crashpad_handler_test.cc', - ], - }], - ], - 'target_conditions': [ - ['OS=="android"', { - 'sources/': [ - ['include', '^linux/'], - ], - }], - ], - }, - { - 'target_name': 'crashpad_handler_test_extended_handler', - 'type': 'executable', - 'dependencies': [ - '../compat/compat.gyp:crashpad_compat', - '../minidump/minidump_test.gyp:crashpad_minidump_test_lib', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../tools/tools.gyp:crashpad_tool_support', - 'handler.gyp:crashpad_handler_lib', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'crashpad_handler_test_extended_handler.cc', - ], - }, - ], - 'conditions': [ - ['OS=="win"', { - 'targets': [ - { - 'target_name': 'crash_other_program', - 'type': 'executable', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../test/test.gyp:crashpad_test', - '../third_party/googletest/googletest.gyp:googletest', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'sources': [ - 'win/crash_other_program.cc', - ], - }, - { - 'target_name': 'crashy_program', - 'type': 'executable', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'win/crashy_test_program.cc', - ], - }, - { - 'target_name': 'crashy_signal', - 'type': 'executable', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'win/crashy_signal.cc', - ], - }, - { - 'target_name': 'fake_handler_that_crashes_at_startup', - 'type': 'executable', - 'sources': [ - 'win/fake_handler_that_crashes_at_startup.cc', - ], - }, - { - 'target_name': 'hanging_program', - 'type': 'executable', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'sources': [ - 'win/hanging_program.cc', - ], - }, - { - 'target_name': 'loader_lock_dll', - 'type': 'loadable_module', - 'sources': [ - 'win/loader_lock_dll.cc', - ], - 'msvs_settings': { - 'NoImportLibrary': 'true', - }, - }, - { - 'target_name': 'self_destroying_program', - 'type': 'executable', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../compat/compat.gyp:crashpad_compat', - '../snapshot/snapshot.gyp:crashpad_snapshot', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'win/self_destroying_test_program.cc', - ], - }, - ], - 'conditions': [ - # Cannot create an x64 DLL with embedded debug info. - ['target_arch=="ia32"', { - 'targets': [ - { - 'target_name': 'crashy_z7_loader', - 'type': 'executable', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../test/test.gyp:crashpad_test', - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'win/crashy_test_z7_loader.cc', - ], - }, - ], - }], - ], - }], - ], -} diff --git a/minidump/minidump.gyp b/minidump/minidump.gyp deleted file mode 100644 index 63e0ba6b..00000000 --- a/minidump/minidump.gyp +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../build/crashpad.gypi', - ], - 'targets': [ - { - 'target_name': 'crashpad_minidump', - 'type': 'static_library', - 'dependencies': [ - '../compat/compat.gyp:crashpad_compat', - '../snapshot/snapshot.gyp:crashpad_snapshot', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'export_dependent_settings': [ - '../compat/compat.gyp:crashpad_compat', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'minidump_annotation_writer.cc', - 'minidump_annotation_writer.h', - 'minidump_byte_array_writer.cc', - 'minidump_byte_array_writer.h', - 'minidump_context.h', - 'minidump_context_writer.cc', - 'minidump_context_writer.h', - 'minidump_crashpad_info_writer.cc', - 'minidump_crashpad_info_writer.h', - 'minidump_exception_writer.cc', - 'minidump_exception_writer.h', - 'minidump_extensions.cc', - 'minidump_extensions.h', - 'minidump_file_writer.cc', - 'minidump_file_writer.h', - 'minidump_handle_writer.cc', - 'minidump_handle_writer.h', - 'minidump_memory_info_writer.cc', - 'minidump_memory_info_writer.h', - 'minidump_memory_writer.cc', - 'minidump_memory_writer.h', - 'minidump_misc_info_writer.cc', - 'minidump_misc_info_writer.h', - 'minidump_module_crashpad_info_writer.cc', - 'minidump_module_crashpad_info_writer.h', - 'minidump_module_writer.cc', - 'minidump_module_writer.h', - 'minidump_rva_list_writer.cc', - 'minidump_rva_list_writer.h', - 'minidump_simple_string_dictionary_writer.cc', - 'minidump_simple_string_dictionary_writer.h', - 'minidump_stream_writer.cc', - 'minidump_stream_writer.h', - 'minidump_string_writer.cc', - 'minidump_string_writer.h', - 'minidump_system_info_writer.cc', - 'minidump_system_info_writer.h', - 'minidump_thread_id_map.cc', - 'minidump_thread_id_map.h', - 'minidump_thread_writer.cc', - 'minidump_thread_writer.h', - 'minidump_unloaded_module_writer.cc', - 'minidump_unloaded_module_writer.h', - 'minidump_user_extension_stream_data_source.cc', - 'minidump_user_extension_stream_data_source.h', - 'minidump_user_stream_writer.cc', - 'minidump_user_stream_writer.h', - 'minidump_writable.cc', - 'minidump_writable.h', - 'minidump_writer_util.cc', - 'minidump_writer_util.h', - ], - }, - ], -} diff --git a/minidump/minidump_test.gyp b/minidump/minidump_test.gyp deleted file mode 100644 index 7c170632..00000000 --- a/minidump/minidump_test.gyp +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../build/crashpad.gypi', - ], - 'targets': [ - { - 'target_name': 'crashpad_minidump_test_lib', - 'type': 'static_library', - 'dependencies': [ - 'minidump.gyp:crashpad_minidump', - '../third_party/googletest/googletest.gyp:googletest', - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'test/minidump_byte_array_writer_test_util.cc', - 'test/minidump_byte_array_writer_test_util.h', - 'test/minidump_context_test_util.cc', - 'test/minidump_context_test_util.h', - 'test/minidump_file_writer_test_util.cc', - 'test/minidump_file_writer_test_util.h', - 'test/minidump_memory_writer_test_util.cc', - 'test/minidump_memory_writer_test_util.h', - 'test/minidump_rva_list_test_util.cc', - 'test/minidump_rva_list_test_util.h', - 'test/minidump_string_writer_test_util.cc', - 'test/minidump_string_writer_test_util.h', - 'test/minidump_user_extension_stream_util.cc', - 'test/minidump_user_extension_stream_util.h', - 'test/minidump_writable_test_util.cc', - 'test/minidump_writable_test_util.h', - ], - }, - { - 'target_name': 'crashpad_minidump_test', - 'type': 'executable', - 'dependencies': [ - 'crashpad_minidump_test_lib', - 'minidump.gyp:crashpad_minidump', - '../snapshot/snapshot_test.gyp:crashpad_snapshot_test_lib', - '../test/test.gyp:crashpad_googletest_main', - '../test/test.gyp:crashpad_test', - '../third_party/googletest/googletest.gyp:googletest', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'minidump_annotation_writer_test.cc', - 'minidump_byte_array_writer_test.cc', - 'minidump_context_writer_test.cc', - 'minidump_crashpad_info_writer_test.cc', - 'minidump_exception_writer_test.cc', - 'minidump_file_writer_test.cc', - 'minidump_handle_writer_test.cc', - 'minidump_memory_info_writer_test.cc', - 'minidump_memory_writer_test.cc', - 'minidump_misc_info_writer_test.cc', - 'minidump_module_crashpad_info_writer_test.cc', - 'minidump_module_writer_test.cc', - 'minidump_rva_list_writer_test.cc', - 'minidump_simple_string_dictionary_writer_test.cc', - 'minidump_string_writer_test.cc', - 'minidump_system_info_writer_test.cc', - 'minidump_thread_id_map_test.cc', - 'minidump_thread_writer_test.cc', - 'minidump_unloaded_module_writer_test.cc', - 'minidump_user_stream_writer_test.cc', - 'minidump_writable_test.cc', - ], - }, - ], -} diff --git a/snapshot/snapshot.gyp b/snapshot/snapshot.gyp deleted file mode 100644 index 788ea3d1..00000000 --- a/snapshot/snapshot.gyp +++ /dev/null @@ -1,216 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../build/crashpad.gypi', - ], - 'targets': [ - { - 'target_name': 'crashpad_snapshot', - 'type': 'static_library', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../compat/compat.gyp:crashpad_compat', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'annotation_snapshot.cc', - 'annotation_snapshot.h', - 'capture_memory.cc', - 'capture_memory.h', - 'cpu_architecture.h', - 'cpu_context.cc', - 'cpu_context.h', - 'crashpad_info_client_options.cc', - 'crashpad_info_client_options.h', - 'crashpad_types/crashpad_info_reader.cc', - 'crashpad_types/crashpad_info_reader.h', - 'crashpad_types/image_annotation_reader.cc', - 'crashpad_types/image_annotation_reader.h', - 'elf/elf_dynamic_array_reader.cc', - 'elf/elf_dynamic_array_reader.h', - 'elf/elf_image_reader.cc', - 'elf/elf_image_reader.h', - 'elf/elf_symbol_table_reader.cc', - 'elf/elf_symbol_table_reader.h', - 'elf/module_snapshot_elf.cc', - 'elf/module_snapshot_elf.h', - 'exception_snapshot.h', - 'handle_snapshot.cc', - 'handle_snapshot.h', - 'linux/cpu_context_linux.cc', - 'linux/cpu_context_linux.h', - 'linux/debug_rendezvous.cc', - 'linux/debug_rendezvous.h', - 'linux/exception_snapshot_linux.cc', - 'linux/exception_snapshot_linux.h', - 'linux/process_reader_linux.cc', - 'linux/process_reader_linux.h', - 'linux/process_snapshot_linux.cc', - 'linux/process_snapshot_linux.h', - 'linux/signal_context.h', - 'linux/system_snapshot_linux.cc', - 'linux/system_snapshot_linux.h', - 'linux/thread_snapshot_linux.cc', - 'linux/thread_snapshot_linux.h', - 'mac/cpu_context_mac.cc', - 'mac/cpu_context_mac.h', - 'mac/exception_snapshot_mac.cc', - 'mac/exception_snapshot_mac.h', - 'mac/mach_o_image_annotations_reader.cc', - 'mac/mach_o_image_annotations_reader.h', - 'mac/mach_o_image_reader.cc', - 'mac/mach_o_image_reader.h', - 'mac/mach_o_image_segment_reader.cc', - 'mac/mach_o_image_segment_reader.h', - 'mac/mach_o_image_symbol_table_reader.cc', - 'mac/mach_o_image_symbol_table_reader.h', - 'mac/module_snapshot_mac.cc', - 'mac/module_snapshot_mac.h', - 'mac/process_reader_mac.cc', - 'mac/process_reader_mac.h', - 'mac/process_snapshot_mac.cc', - 'mac/process_snapshot_mac.h', - 'mac/process_types.cc', - 'mac/process_types.h', - 'mac/process_types/all.proctype', - 'mac/process_types/annotation.proctype', - 'mac/process_types/crashpad_info.proctype', - 'mac/process_types/crashreporterclient.proctype', - 'mac/process_types/custom.cc', - 'mac/process_types/dyld_images.proctype', - 'mac/process_types/flavors.h', - 'mac/process_types/internal.h', - 'mac/process_types/loader.proctype', - 'mac/process_types/nlist.proctype', - 'mac/process_types/traits.h', - 'mac/system_snapshot_mac.cc', - 'mac/system_snapshot_mac.h', - 'mac/thread_snapshot_mac.cc', - 'mac/thread_snapshot_mac.h', - 'memory_snapshot.cc', - 'memory_snapshot.h', - 'memory_snapshot_generic.h', - 'minidump/minidump_annotation_reader.cc', - 'minidump/minidump_annotation_reader.h', - 'minidump/minidump_context_converter.cc', - 'minidump/minidump_context_converter.h', - 'minidump/minidump_simple_string_dictionary_reader.cc', - 'minidump/minidump_simple_string_dictionary_reader.h', - 'minidump/minidump_stream.h', - 'minidump/minidump_string_list_reader.cc', - 'minidump/minidump_string_list_reader.h', - 'minidump/minidump_string_reader.cc', - 'minidump/minidump_string_reader.h', - 'minidump/exception_snapshot_minidump.cc', - 'minidump/exception_snapshot_minidump.h', - 'minidump/memory_snapshot_minidump.cc', - 'minidump/memory_snapshot_minidump.h', - 'minidump/module_snapshot_minidump.cc', - 'minidump/module_snapshot_minidump.h', - 'minidump/process_snapshot_minidump.cc', - 'minidump/process_snapshot_minidump.h', - 'minidump/system_snapshot_minidump.cc', - 'minidump/system_snapshot_minidump.h', - 'minidump/thread_snapshot_minidump.cc', - 'minidump/thread_snapshot_minidump.h', - 'module_snapshot.h', - 'posix/timezone.cc', - 'posix/timezone.h', - 'process_snapshot.h', - 'sanitized/memory_snapshot_sanitized.cc', - 'sanitized/memory_snapshot_sanitized.h', - 'sanitized/module_snapshot_sanitized.cc', - 'sanitized/module_snapshot_sanitized.h', - 'sanitized/process_snapshot_sanitized.cc', - 'sanitized/process_snapshot_sanitized.h', - 'sanitized/sanitization_information.cc', - 'sanitized/sanitization_information.h', - 'sanitized/thread_snapshot_sanitized.cc', - 'sanitized/thread_snapshot_sanitized.h', - 'snapshot_constants.h', - 'system_snapshot.h', - 'thread_snapshot.h', - 'unloaded_module_snapshot.cc', - 'unloaded_module_snapshot.h', - 'win/cpu_context_win.cc', - 'win/cpu_context_win.h', - 'win/exception_snapshot_win.cc', - 'win/exception_snapshot_win.h', - 'win/capture_memory_delegate_win.cc', - 'win/capture_memory_delegate_win.h', - 'win/memory_map_region_snapshot_win.cc', - 'win/memory_map_region_snapshot_win.h', - 'win/module_snapshot_win.cc', - 'win/module_snapshot_win.h', - 'win/pe_image_annotations_reader.cc', - 'win/pe_image_annotations_reader.h', - 'win/pe_image_reader.cc', - 'win/pe_image_reader.h', - 'win/pe_image_resource_reader.cc', - 'win/pe_image_resource_reader.h', - 'win/process_reader_win.cc', - 'win/process_reader_win.h', - 'win/process_snapshot_win.cc', - 'win/process_snapshot_win.h', - 'win/process_subrange_reader.cc', - 'win/process_subrange_reader.h', - 'win/system_snapshot_win.cc', - 'win/system_snapshot_win.h', - 'win/thread_snapshot_win.cc', - 'win/thread_snapshot_win.h', - 'x86/cpuid_reader.cc', - 'x86/cpuid_reader.h', - ], - 'conditions': [ - ['OS=="win"', { - 'link_settings': { - 'libraries': [ - '-lpowrprof.lib', - ], - }, - }], - ['OS=="linux" or OS=="android"', { - 'sources!': [ - 'capture_memory.cc', - 'capture_memory.h', - ], - }, { # else: OS!="linux" and OS!="android" - 'sources/': [ - ['exclude', '^elf/'], - ['exclude', '^crashpad_types/'], - ['exclude', '^sanitized/'], - ], - }], - ['target_arch!="ia32" and target_arch!="x64"', { - 'sources/': [ - ['exclude', '^x86/'], - ], - }], - ], - 'target_conditions': [ - ['OS=="android"', { - 'sources/': [ - ['include', '^linux/'], - ], - }], - ], - }, - ], -} diff --git a/snapshot/snapshot_test.gyp b/snapshot/snapshot_test.gyp deleted file mode 100644 index 361a33a7..00000000 --- a/snapshot/snapshot_test.gyp +++ /dev/null @@ -1,350 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../build/crashpad.gypi', - ], - 'targets': [ - { - 'target_name': 'crashpad_snapshot_test_lib', - 'type': 'static_library', - 'dependencies': [ - 'snapshot.gyp:crashpad_snapshot', - '../compat/compat.gyp:crashpad_compat', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'test/test_cpu_context.cc', - 'test/test_cpu_context.h', - 'test/test_exception_snapshot.cc', - 'test/test_exception_snapshot.h', - 'test/test_memory_map_region_snapshot.cc', - 'test/test_memory_map_region_snapshot.h', - 'test/test_memory_snapshot.cc', - 'test/test_memory_snapshot.h', - 'test/test_module_snapshot.cc', - 'test/test_module_snapshot.h', - 'test/test_process_snapshot.cc', - 'test/test_process_snapshot.h', - 'test/test_system_snapshot.cc', - 'test/test_system_snapshot.h', - 'test/test_thread_snapshot.cc', - 'test/test_thread_snapshot.h', - ], - }, - { - 'target_name': 'crashpad_snapshot_test', - 'type': 'executable', - 'dependencies': [ - 'crashpad_snapshot_test_lib', - 'crashpad_snapshot_test_module', - 'crashpad_snapshot_test_module_large', - 'crashpad_snapshot_test_module_small', - 'snapshot.gyp:crashpad_snapshot', - '../client/client.gyp:crashpad_client', - '../compat/compat.gyp:crashpad_compat', - '../test/test.gyp:crashpad_googlemock_main', - '../test/test.gyp:crashpad_test', - '../third_party/googletest/googlemock.gyp:googlemock', - '../third_party/googletest/googletest.gyp:googletest', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'cpu_context_test.cc', - 'memory_snapshot_test.cc', - 'crashpad_info_client_options_test.cc', - 'crashpad_types/crashpad_info_reader_test.cc', - 'crashpad_types/image_annotation_reader_test.cc', - 'elf/elf_image_reader_test.cc', - 'elf/elf_image_reader_test_note.S', - 'linux/debug_rendezvous_test.cc', - 'linux/exception_snapshot_linux_test.cc', - 'linux/process_reader_linux_test.cc', - 'linux/system_snapshot_linux_test.cc', - 'linux/test_modules.cc', - 'linux/test_modules.h', - 'mac/cpu_context_mac_test.cc', - 'mac/mach_o_image_annotations_reader_test.cc', - 'mac/mach_o_image_reader_test.cc', - 'mac/mach_o_image_segment_reader_test.cc', - 'mac/process_reader_mac_test.cc', - 'mac/process_types_test.cc', - 'mac/system_snapshot_mac_test.cc', - 'minidump/process_snapshot_minidump_test.cc', - 'posix/timezone_test.cc', - 'sanitized/process_snapshot_sanitized_test.cc', - 'sanitized/sanitization_information_test.cc', - 'win/cpu_context_win_test.cc', - 'win/exception_snapshot_win_test.cc', - 'win/extra_memory_ranges_test.cc', - 'win/module_snapshot_win_test.cc', - 'win/pe_image_reader_test.cc', - 'win/process_reader_win_test.cc', - 'win/process_snapshot_win_test.cc', - 'win/system_snapshot_win_test.cc', - ], - 'conditions': [ - # .gnu.hash is incompatible with the MIPS ABI - ['target_arch!="mips"', { - 'dependencies': ['crashpad_snapshot_test_both_dt_hash_styles'] - }], - ['OS=="mac"', { - 'dependencies': [ - 'crashpad_snapshot_test_module_crashy_initializer', - 'crashpad_snapshot_test_no_op', - ], - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/OpenCL.framework', - ], - }, - }], - ['OS=="win"', { - 'dependencies': [ - 'crashpad_snapshot_test_annotations', - 'crashpad_snapshot_test_crashing_child', - 'crashpad_snapshot_test_dump_without_crashing', - 'crashpad_snapshot_test_extra_memory_ranges', - 'crashpad_snapshot_test_image_reader', - 'crashpad_snapshot_test_image_reader_module', - ], - }], - ['OS=="linux" or OS=="android"', { - 'sources!': [ - 'crashpad_info_client_options_test.cc', - ], - 'copies': [{ - 'destination': '<(PRODUCT_DIR)', - 'files': [ - 'elf/test_exported_symbols.sym', - ], - }], - 'ldflags': [ - '-Wl,--dynamic-list=test_exported_symbols.sym', - ], - 'link_settings': { - 'libraries': [ - '-ldl', - ], - }, - }, { # else: OS!="linux" and OS!="android" - 'sources/': [ - ['exclude', '^elf/'], - ['exclude', '^crashpad_types/'], - ['exclude', '^sanitized/'], - ], - }], - ], - 'target_conditions': [ - ['OS=="android"', { - 'sources/': [ - ['include', '^linux/'], - ], - }], - ], - }, - { - 'target_name': 'crashpad_snapshot_test_module', - 'type': 'loadable_module', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'crashpad_info_client_options_test_module.cc', - ], - }, - { - 'target_name': 'crashpad_snapshot_test_module_large', - 'type': 'loadable_module', - 'dependencies': [ - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'defines': [ - 'CRASHPAD_INFO_SIZE_TEST_MODULE_LARGE=1', - ], - 'sources': [ - 'crashpad_info_size_test_module.cc', - ], - 'include_dirs': [ - '..', - ], - 'conditions': [ - ['OS=="linux" or OS=="android"', { - 'sources': [ - 'crashpad_info_size_test_note.S', - ], - 'dependencies': [ - '../util/util.gyp:crashpad_util', - ], - }], - ], - }, - { - 'target_name': 'crashpad_snapshot_test_module_small', - 'type': 'loadable_module', - 'dependencies': [ - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'defines': [ - 'CRASHPAD_INFO_SIZE_TEST_MODULE_SMALL=1', - ], - 'sources': [ - 'crashpad_info_size_test_module.cc', - ], - 'include_dirs': [ - '..', - ], - 'conditions': [ - ['OS=="linux" or OS=="android"', { - 'sources': [ - 'crashpad_info_size_test_note.S', - ], - 'dependencies': [ - '../util/util.gyp:crashpad_util', - ], - }], - ], - }, - { - 'target_name': 'crashpad_snapshot_test_both_dt_hash_styles', - 'type': 'executable', - 'conditions': [ - # .gnu.hash is incompatible with the MIPS ABI - ['target_arch!="mips"', { - 'sources': [ - 'hash_types_test.cc', - ], - 'ldflags': [ - # This makes `ld` emit both .hash and .gnu.hash sections. - '-Wl,--hash-style=both', - ]}, - ] - ], - }, - ], - 'conditions': [ - ['OS=="mac"', { - 'targets': [ - { - 'target_name': 'crashpad_snapshot_test_module_crashy_initializer', - 'type': 'loadable_module', - 'sources': [ - 'mac/mach_o_image_annotations_reader_test_module_crashy_initializer.cc', - ], - }, - { - 'target_name': 'crashpad_snapshot_test_no_op', - 'type': 'executable', - 'sources': [ - 'mac/mach_o_image_annotations_reader_test_no_op.cc', - ], - }, - ], - }], - ['OS=="win"', { - 'targets': [ - { - 'target_name': 'crashpad_snapshot_test_crashing_child', - 'type': 'executable', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../compat/compat.gyp:crashpad_compat', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'sources': [ - 'win/crashpad_snapshot_test_crashing_child.cc', - ], - }, - { - 'target_name': 'crashpad_snapshot_test_dump_without_crashing', - 'type': 'executable', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../compat/compat.gyp:crashpad_compat', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'sources': [ - 'win/crashpad_snapshot_test_dump_without_crashing.cc', - ], - }, - { - 'target_name': 'crashpad_snapshot_test_extra_memory_ranges', - 'type': 'executable', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../compat/compat.gyp:crashpad_compat', - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'sources': [ - 'win/crashpad_snapshot_test_extra_memory_ranges.cc', - ], - }, - { - 'target_name': 'crashpad_snapshot_test_image_reader', - 'type': 'executable', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../compat/compat.gyp:crashpad_compat', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'sources': [ - 'win/crashpad_snapshot_test_image_reader.cc', - ], - }, - { - 'target_name': 'crashpad_snapshot_test_image_reader_module', - 'type': 'loadable_module', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'sources': [ - 'win/crashpad_snapshot_test_image_reader_module.cc', - ], - 'msvs_settings': { - 'NoImportLibrary': 'true', - }, - }, - { - 'target_name': 'crashpad_snapshot_test_annotations', - 'type': 'executable', - 'dependencies': [ - '../client/client.gyp:crashpad_client', - '../compat/compat.gyp:crashpad_compat', - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'sources': [ - 'win/crashpad_snapshot_test_annotations.cc', - ], - }, - ], - }], - ], -} diff --git a/test/test.gyp b/test/test.gyp deleted file mode 100644 index aea1675a..00000000 --- a/test/test.gyp +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright 2015 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../build/crashpad.gypi', - ], - 'targets': [ - { - 'target_name': 'crashpad_test', - 'type': 'static_library', - 'dependencies': [ - '../compat/compat.gyp:crashpad_compat', - '../third_party/googletest/googletest.gyp:googletest', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'errors.cc', - 'errors.h', - 'file.cc', - 'file.h', - 'filesystem.cc', - 'filesystem.h', - 'gtest_death.h', - 'hex_string.cc', - 'hex_string.h', - 'linux/fake_ptrace_connection.cc', - 'linux/fake_ptrace_connection.h', - 'linux/get_tls.cc', - 'linux/get_tls.h', - 'mac/dyld.cc', - 'mac/dyld.h', - 'mac/exception_swallower.cc', - 'mac/exception_swallower.h', - 'mac/mach_errors.cc', - 'mac/mach_errors.h', - 'mac/mach_multiprocess.cc', - 'mac/mach_multiprocess.h', - 'main_arguments.cc', - 'main_arguments.h', - 'multiprocess.h', - 'multiprocess_exec.cc', - 'multiprocess_exec.h', - 'multiprocess_exec_posix.cc', - 'multiprocess_exec_win.cc', - 'multiprocess_posix.cc', - 'process_type.cc', - 'process_type.h', - 'scoped_guarded_page.h', - 'scoped_guarded_page_posix.cc', - 'scoped_module_handle.cc', - 'scoped_module_handle.h', - 'scoped_temp_dir.cc', - 'scoped_temp_dir.h', - 'scoped_temp_dir_posix.cc', - 'scoped_temp_dir_win.cc', - 'test_paths.cc', - 'test_paths.h', - 'win/child_launcher.cc', - 'win/child_launcher.h', - 'win/win_child_process.cc', - 'win/win_child_process.h', - 'win/win_multiprocess.cc', - 'win/win_multiprocess.h', - 'win/win_multiprocess_with_temp_dir.cc', - 'win/win_multiprocess_with_temp_dir.h', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '..', - ], - }, - 'conditions': [ - ['OS=="mac"', { - 'dependencies': [ - '../handler/handler.gyp:crashpad_handler_lib', - '../snapshot/snapshot.gyp:crashpad_snapshot', - ], - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/usr/lib/libbsm.dylib', - ], - }, - }], - ['OS=="win"', { - 'link_settings': { - 'libraries': [ - '-lshell32.lib', - ], - }, - }], - ], - 'target_conditions': [ - ['OS=="android"', { - 'sources/': [ - ['include', '^linux/'], - ], - }], - ], - }, - { - 'target_name': 'crashpad_googlemock_main', - 'type': 'static_library', - 'dependencies': [ - 'crashpad_test', - '../third_party/googletest/googlemock.gyp:googlemock', - '../third_party/googletest/googletest.gyp:googletest', - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'include_dirs': [ - '..', - ], - 'defines': [ - 'CRASHPAD_TEST_LAUNCHER_GOOGLEMOCK=1', - ], - 'sources': [ - 'gtest_main.cc', - ], - }, - { - 'target_name': 'crashpad_googletest_main', - 'type': 'static_library', - 'dependencies': [ - 'crashpad_test', - '../third_party/googletest/googletest.gyp:googletest', - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'include_dirs': [ - '..', - ], - 'defines': [ - 'CRASHPAD_TEST_LAUNCHER_GOOGLETEST=1', - ], - 'sources': [ - 'gtest_main.cc', - ], - }, - ], -} diff --git a/test/test_test.gyp b/test/test_test.gyp deleted file mode 100644 index 59189158..00000000 --- a/test/test_test.gyp +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 2015 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../build/crashpad.gypi', - ], - 'targets': [ - { - 'target_name': 'crashpad_test_test', - 'type': 'executable', - 'dependencies': [ - 'crashpad_test_test_multiprocess_exec_test_child', - 'test.gyp:crashpad_googlemock_main', - 'test.gyp:crashpad_test', - '../compat/compat.gyp:crashpad_compat', - '../third_party/googletest/googlemock.gyp:googlemock', - '../third_party/googletest/googletest.gyp:googletest', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'hex_string_test.cc', - 'mac/mach_multiprocess_test.cc', - 'main_arguments_test.cc', - 'multiprocess_exec_test.cc', - 'multiprocess_posix_test.cc', - 'scoped_guarded_page_test.cc', - 'scoped_temp_dir_test.cc', - 'test_paths_test.cc', - 'win/win_child_process_test.cc', - 'win/win_multiprocess_test.cc', - ], - }, - { - 'target_name': 'crashpad_test_test_multiprocess_exec_test_child', - 'type': 'executable', - 'dependencies': [ - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'sources': [ - 'multiprocess_exec_test_child.cc', - ], - }, - ], -} diff --git a/third_party/getopt/getopt.gyp b/third_party/getopt/getopt.gyp deleted file mode 100644 index 56445843..00000000 --- a/third_party/getopt/getopt.gyp +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2015 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../../build/crashpad.gypi', - ], - 'conditions': [ - ['OS=="win"', { - 'targets': [ - { - 'target_name': 'getopt', - 'type': 'static_library', - 'sources': [ - 'getopt.cc', - 'getopt.h', - ], - }, - ], - }, { - 'targets': [] - }] - ], -} diff --git a/third_party/googletest/googlemock.gyp b/third_party/googletest/googlemock.gyp deleted file mode 100644 index 371f5a39..00000000 --- a/third_party/googletest/googlemock.gyp +++ /dev/null @@ -1,224 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../../build/crashpad_dependencies.gypi', - ], - 'conditions': [ - ['1==1', { # Defer processing until crashpad_dependencies is set - 'variables': { - 'conditions': [ - ['crashpad_dependencies=="standalone"', { - 'googlemock_dir': 'googletest/googlemock', - }], - ['crashpad_dependencies=="external"', { - 'googlemock_dir': '../../../../gmock', - }], - ], - }, - }], - ], - 'target_defaults': { - # Google Mock relies heavily on objects with static storage duration. - 'xcode_settings': { - 'WARNING_CFLAGS!': [ - '-Wexit-time-destructors', - ], - }, - 'cflags!': [ - '-Wexit-time-destructors', - ], - }, - - 'targets': [ - { - 'target_name': 'googlemock', - 'type': 'static_library', - 'dependencies': [ - 'googletest.gyp:googletest', - ], - 'include_dirs': [ - '<(googlemock_dir)', - '<(googlemock_dir)/include', - ], - 'sources': [ - '<(googlemock_dir)/include/gmock/gmock-actions.h', - '<(googlemock_dir)/include/gmock/gmock-cardinalities.h', - '<(googlemock_dir)/include/gmock/gmock-function-mocker.h', - '<(googlemock_dir)/include/gmock/gmock-generated-actions.h', - '<(googlemock_dir)/include/gmock/gmock-matchers.h', - '<(googlemock_dir)/include/gmock/gmock-more-actions.h', - '<(googlemock_dir)/include/gmock/gmock-more-matchers.h', - '<(googlemock_dir)/include/gmock/gmock-nice-strict.h', - '<(googlemock_dir)/include/gmock/gmock-spec-builders.h', - '<(googlemock_dir)/include/gmock/gmock.h', - '<(googlemock_dir)/include/gmock/internal/custom/gmock-generated-actions.h', - '<(googlemock_dir)/include/gmock/internal/custom/gmock-matchers.h', - '<(googlemock_dir)/include/gmock/internal/custom/gmock-port.h', - '<(googlemock_dir)/include/gmock/internal/custom/gmock-pp.h', - '<(googlemock_dir)/include/gmock/internal/gmock-generated-internal-utils.h', - '<(googlemock_dir)/include/gmock/internal/gmock-internal-utils.h', - '<(googlemock_dir)/include/gmock/internal/gmock-port.h', - '<(googlemock_dir)/src/gmock-all.cc', - '<(googlemock_dir)/src/gmock-cardinalities.cc', - '<(googlemock_dir)/src/gmock-internal-utils.cc', - '<(googlemock_dir)/src/gmock-matchers.cc', - '<(googlemock_dir)/src/gmock-spec-builders.cc', - '<(googlemock_dir)/src/gmock.cc', - ], - 'sources!': [ - '<(googlemock_dir)/src/gmock-all.cc', - ], - - 'direct_dependent_settings': { - 'include_dirs': [ - '<(googlemock_dir)/include', - ], - 'conditions': [ - ['clang!=0', { - # 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 until https://github.com/google/googletest/issues/533 is - # fixed. - 'conditions': [ - ['OS=="mac"', { - 'xcode_settings': { - 'WARNING_CFLAGS': [ - '-Wno-inconsistent-missing-override', - ], - }, - }], - ['OS=="linux" or OS=="android"', { - 'cflags': [ - '-Wno-inconsistent-missing-override', - ], - }], - ], - }], - ], - }, - 'export_dependent_settings': [ - 'googletest.gyp:googletest', - ], - }, - { - 'target_name': 'googlemock_main', - 'type': 'static_library', - 'dependencies': [ - 'googlemock', - 'googletest.gyp:googletest', - ], - 'sources': [ - '<(googlemock_dir)/src/gmock_main.cc', - ], - }, - { - 'target_name': 'googlemock_test_executable', - 'type': 'none', - 'dependencies': [ - 'googlemock', - 'googletest.gyp:googletest', - ], - 'direct_dependent_settings': { - 'type': 'executable', - 'include_dirs': [ - '<(googlemock_dir)', - ], - }, - 'export_dependent_settings': [ - 'googlemock', - 'googletest.gyp:googletest', - ], - }, - { - 'target_name': 'gmock_all_test', - 'dependencies': [ - 'googlemock_test_executable', - 'googlemock_main', - ], - 'include_dirs': [ - 'googletest/googletest', - ], - 'sources': [ - '<(googlemock_dir)/test/gmock-actions_test.cc', - '<(googlemock_dir)/test/gmock-cardinalities_test.cc', - '<(googlemock_dir)/test/gmock-function-mocker_test.cc', - '<(googlemock_dir)/test/gmock-generated-actions_test.cc', - '<(googlemock_dir)/test/gmock-generated-matchers_test.cc', - '<(googlemock_dir)/test/gmock-internal-utils_test.cc', - '<(googlemock_dir)/test/gmock-matchers_test.cc', - '<(googlemock_dir)/test/gmock-more-actions_test.cc', - '<(googlemock_dir)/test/gmock-nice-strict_test.cc', - '<(googlemock_dir)/test/gmock-port_test.cc', - '<(googlemock_dir)/test/gmock-pp-string_test.cc', - '<(googlemock_dir)/test/gmock-pp_test.cc', - '<(googlemock_dir)/test/gmock-spec-builders_test.cc', - '<(googlemock_dir)/test/gmock_test.cc', - ], - 'conditions': [ - ['clang!=0', { - # For googletest/googlemock/test/gmock-matchers_test.cc’s - # Unstreamable::value_. - 'conditions': [ - ['OS=="mac"', { - 'xcode_settings': { - 'WARNING_CFLAGS': [ - '-Wno-unused-private-field', - ], - }, - }], - ['OS=="linux" or OS=="android"', { - 'cflags': [ - '-Wno-unused-private-field', - ], - }], - ], - }], - ], - }, - { - 'target_name': 'gmock_link_test', - 'dependencies': [ - 'googlemock_test_executable', - 'googlemock_main', - ], - 'sources': [ - '<(googlemock_dir)/test/gmock_link_test.cc', - '<(googlemock_dir)/test/gmock_link_test.h', - '<(googlemock_dir)/test/gmock_link2_test.cc', - ], - }, - { - 'target_name': 'gmock_stress_test', - 'dependencies': [ - 'googlemock_test_executable', - ], - 'sources': [ - '<(googlemock_dir)/test/gmock_stress_test.cc', - ], - }, - { - 'target_name': 'googlemock_all_tests', - 'type': 'none', - 'dependencies': [ - 'gmock_all_test', - 'gmock_link_test', - 'gmock_stress_test', - ], - }, - ], -} diff --git a/third_party/googletest/googletest.gyp b/third_party/googletest/googletest.gyp deleted file mode 100644 index ad79eb78..00000000 --- a/third_party/googletest/googletest.gyp +++ /dev/null @@ -1,323 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../../build/crashpad_dependencies.gypi', - ], - 'conditions': [ - ['1==1', { # Defer processing until crashpad_dependencies is set - 'variables': { - 'conditions': [ - ['crashpad_dependencies=="standalone"', { - 'googletest_dir': 'googletest/googletest', - }], - ['crashpad_dependencies=="external"', { - 'googletest_dir': '../../../../gtest', - }], - ], - }, - }], - ], - 'target_defaults': { - # googletest relies heavily on objects with static storage duration. - 'xcode_settings': { - 'WARNING_CFLAGS!': [ - '-Wexit-time-destructors', - ], - }, - 'cflags!': [ - '-Wexit-time-destructors', - ], - - 'conditions': [ - ['OS=="android" and android_api_level!="" and android_api_level<24', { - 'defines!': [ - # Although many system interfaces are available to 32-bit code with - # 64-bit off_t at API 21, the routines in are not until API - # 24. googletest doesn’t make use of these functions directly, but can - # reach them indirectly via the C++ standard library. Disable 64-bit - # off_t prior to API 24 so that these uses can work. Since nothing - # dependent on the size of off_t should escape googletest’s own API, this - # should be safe even in a program that otherwise uses a 64-bit off_t. - '_FILE_OFFSET_BITS=64', - ], - }], - ], - }, - - 'targets': [ - { - 'target_name': 'googletest', - 'type': 'static_library', - 'include_dirs': [ - '<(googletest_dir)', - '<(googletest_dir)/include', - ], - 'sources': [ - '<(googletest_dir)/include/gtest/gtest-death-test.h', - '<(googletest_dir)/include/gtest/gtest-matchers.h', - '<(googletest_dir)/include/gtest/gtest-message.h', - '<(googletest_dir)/include/gtest/gtest-param-test.h', - '<(googletest_dir)/include/gtest/gtest-printers.h', - '<(googletest_dir)/include/gtest/gtest-spi.h', - '<(googletest_dir)/include/gtest/gtest-test-part.h', - '<(googletest_dir)/include/gtest/gtest-typed-test.h', - '<(googletest_dir)/include/gtest/gtest.h', - '<(googletest_dir)/include/gtest/gtest_pred_impl.h', - '<(googletest_dir)/include/gtest/gtest_prod.h', - '<(googletest_dir)/include/gtest/internal/custom/gtest-port.h', - '<(googletest_dir)/include/gtest/internal/custom/gtest-printers.h', - '<(googletest_dir)/include/gtest/internal/custom/gtest.h', - '<(googletest_dir)/include/gtest/internal/gtest-death-test-internal.h', - '<(googletest_dir)/include/gtest/internal/gtest-filepath.h', - '<(googletest_dir)/include/gtest/internal/gtest-internal.h', - '<(googletest_dir)/include/gtest/internal/gtest-param-util-generated.h', - '<(googletest_dir)/include/gtest/internal/gtest-param-util.h', - '<(googletest_dir)/include/gtest/internal/gtest-port-arch.h', - '<(googletest_dir)/include/gtest/internal/gtest-port.h', - '<(googletest_dir)/include/gtest/internal/gtest-string.h', - '<(googletest_dir)/include/gtest/internal/gtest-type-util.h', - '<(googletest_dir)/src/gtest-all.cc', - '<(googletest_dir)/src/gtest-death-test.cc', - '<(googletest_dir)/src/gtest-filepath.cc', - '<(googletest_dir)/src/gtest-internal-inl.h', - '<(googletest_dir)/src/gtest-matchers.cc', - '<(googletest_dir)/src/gtest-port.cc', - '<(googletest_dir)/src/gtest-printers.cc', - '<(googletest_dir)/src/gtest-test-part.cc', - '<(googletest_dir)/src/gtest-typed-test.cc', - '<(googletest_dir)/src/gtest.cc', - ], - 'sources!': [ - '<(googletest_dir)/src/gtest-all.cc', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(googletest_dir)/include', - ], - }, - 'conditions': [ - ['crashpad_dependencies=="external"', { - 'include_dirs': [ - '<(googletest_dir)/../..', - ], - 'defines': [ - 'GUNIT_NO_GOOGLE3=1', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(googletest_dir)/../..', - ], - 'defines': [ - 'GUNIT_NO_GOOGLE3=1', - ], - }, - }], - ], - }, - { - 'target_name': 'googletest_main', - 'type': 'static_library', - 'dependencies': [ - 'googletest', - ], - 'sources': [ - '<(googletest_dir)/src/gtest_main.cc', - ], - }, - { - 'target_name': 'googletest_test_executable', - 'type': 'none', - 'dependencies': [ - 'googletest', - ], - 'direct_dependent_settings': { - 'type': 'executable', - 'include_dirs': [ - '<(googletest_dir)', - ], - }, - 'export_dependent_settings': [ - 'googletest', - ], - }, - { - 'target_name': 'gtest_all_test', - 'dependencies': [ - 'googletest_test_executable', - 'googletest_main', - ], - 'sources': [ - '<(googletest_dir)/test/googletest-death-test-test.cc', - '<(googletest_dir)/test/googletest-filepath-test.cc', - '<(googletest_dir)/test/googletest-message-test.cc', - '<(googletest_dir)/test/googletest-options-test.cc', - '<(googletest_dir)/test/googletest-port-test.cc', - '<(googletest_dir)/test/googletest-printers-testcc', - '<(googletest_dir)/test/googletest-test-part-test.cc', - '<(googletest_dir)/test/gtest-typed-test2_test.cc', - '<(googletest_dir)/test/gtest-typed-test_test.cc', - '<(googletest_dir)/test/gtest-typed-test_test.h', - '<(googletest_dir)/test/gtest_main_unittest.cc', - '<(googletest_dir)/test/gtest_pred_impl_unittest.cc', - '<(googletest_dir)/test/gtest_prod_test.cc', - '<(googletest_dir)/test/gtest_skip_test.cc', - '<(googletest_dir)/test/gtest_unittest.cc', - '<(googletest_dir)/test/production.cc', - '<(googletest_dir)/test/production.h', - ], - }, - { - 'target_name': 'gtest_environment_test', - 'dependencies': [ - 'googletest_test_executable', - ], - 'sources': [ - '<(googletest_dir)/test/gtest_environment_test.cc', - ], - }, - { - 'target_name': 'gtest_listener_test', - 'dependencies': [ - 'googletest_test_executable', - ], - 'sources': [ - '<(googletest_dir)/test/googletest-listener-test.cc', - ], - }, - { - 'target_name': 'gtest_macro_stack_footprint_test', - 'dependencies': [ - 'googletest_test_executable', - ], - 'sources': [ - '<(googletest_dir)/test/gtest_test_macro_stack_footprint_test.cc', - ], - }, - { - 'target_name': 'gtest_no_test', - 'dependencies': [ - 'googletest_test_executable', - ], - 'sources': [ - '<(googletest_dir)/test/gtest_no_test_unittest.cc', - ], - }, - { - 'target_name': 'gtest_param_test', - 'dependencies': [ - 'googletest_test_executable', - ], - 'sources': [ - '<(googletest_dir)/test/googletest-param-test-test.cc', - '<(googletest_dir)/test/googletest-param-test-test.h', - '<(googletest_dir)/test/googletest-param-test2-test.cc', - ], - 'conditions': [ - ['clang!=0', { - # For googletest/googlemock/test/gmock-matchers_test.cc’s - # Unstreamable::value_. - 'conditions': [ - ['OS=="mac"', { - 'xcode_settings': { - 'WARNING_CFLAGS': [ - '-Wno-unused-private-field', - ], - }, - }], - ['OS=="linux" or OS=="android"', { - 'cflags': [ - '-Wno-unused-private-field', - ], - }], - ], - }], - ], - }, - { - 'target_name': 'gtest_premature_exit_test', - 'dependencies': [ - 'googletest_test_executable', - ], - 'sources': [ - '<(googletest_dir)/test/gtest_premature_exit_test.cc', - ], - }, - { - 'target_name': 'gtest_repeat_test', - 'dependencies': [ - 'googletest_test_executable', - ], - 'sources': [ - '<(googletest_dir)/test/gtest_repeat_test.cc', - ], - }, - { - 'target_name': 'gtest_skip_in_environment_setup_test', - 'dependencies': [ - 'googletest_test_executable', - ], - 'sources': [ - '<(googletest_dir)/test/gtest_skip_in_environment_setup_test.cc', - ], - }, - { - 'target_name': 'gtest_sole_header_test', - 'dependencies': [ - 'googletest_test_executable', - 'googletest_main', - ], - 'sources': [ - '<(googletest_dir)/test/gtest_sole_header_test.cc', - ], - }, - { - 'target_name': 'gtest_stress_test', - 'dependencies': [ - 'googletest_test_executable', - ], - 'sources': [ - '<(googletest_dir)/test/gtest_stress_test.cc', - ], - }, - { - 'target_name': 'gtest_unittest_api_test', - 'dependencies': [ - 'googletest_test_executable', - ], - 'sources': [ - '<(googletest_dir)/test/gtest-unittest-api_test.cc', - ], - }, - { - 'target_name': 'googletest_all_tests', - 'type': 'none', - 'dependencies': [ - 'gtest_all_test', - 'gtest_environment_test', - 'gtest_listener_test', - 'gtest_macro_stack_footprint_test', - 'gtest_no_test', - 'gtest_param_test', - 'gtest_premature_exit_test', - 'gtest_repeat_test', - 'gtest_skip_in_environment_setup_test', - 'gtest_sole_header_test', - 'gtest_stress_test', - 'gtest_unittest_api_test', - ], - }, - ], -} diff --git a/third_party/lss/lss.gyp b/third_party/lss/lss.gyp deleted file mode 100644 index 63b9b3ae..00000000 --- a/third_party/lss/lss.gyp +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2019 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'targets': [ - { - 'target_name': 'lss', - 'type': 'none', - 'sources': [ 'lss.h' ], - 'direct_dependent_settings': { - # gyp is only used in circumstances when the embedded lss is used. - 'defines': [ 'CRASHPAD_LSS_SOURCE_EMBEDDED' ] - }, - } - ] -} diff --git a/third_party/mini_chromium/mini_chromium.gyp b/third_party/mini_chromium/mini_chromium.gyp deleted file mode 100644 index e14a1fa5..00000000 --- a/third_party/mini_chromium/mini_chromium.gyp +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2015 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../../build/crashpad_dependencies.gypi', - ], - 'targets': [ - { - # To support Crashpad’s standalone build and its build depending on - # external libraries, Crashpad code depending on base should do so through - # this shim, which will either get base from mini_chromium or an external - # library depending on the build type. - 'target_name': 'base', - 'type': 'none', - 'conditions': [ - ['crashpad_dependencies=="standalone"', { - 'dependencies': [ - 'mini_chromium/base/base.gyp:base', - ], - 'export_dependent_settings': [ - 'mini_chromium/base/base.gyp:base', - ], - }], - ['crashpad_dependencies=="external"', { - 'dependencies': [ - '../../../../mini_chromium/mini_chromium/base/base.gyp:base', - ], - 'export_dependent_settings': [ - '../../../../mini_chromium/mini_chromium/base/base.gyp:base', - ], - }], - ], - }, - ], -} diff --git a/third_party/zlib/zlib.gyp b/third_party/zlib/zlib.gyp deleted file mode 100644 index df26cc23..00000000 --- a/third_party/zlib/zlib.gyp +++ /dev/null @@ -1,168 +0,0 @@ -# Copyright 2017 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../../build/crashpad_dependencies.gypi', - ], - 'conditions': [ - ['1==1', { # Defer processing until crashpad_dependencies is set - 'variables': { - 'conditions': [ - ['crashpad_dependencies=="external"', { - 'zlib_source%': 'external', - }, 'OS!="win"', { - # Use the system zlib by default where available, as it is on most - # platforms. Windows does not have a system zlib, so use “embedded” - # which directs the build to use the source code in the zlib - # subdirectory. - 'zlib_source%': 'system', - }, { - 'zlib_source%': 'embedded', - }], - ], - }, - }], - ], - 'targets': [ - { - 'target_name': 'zlib', - 'conditions': [ - ['zlib_source=="system"', { - 'type': 'none', - 'direct_dependent_settings': { - 'defines': [ - 'CRASHPAD_ZLIB_SOURCE_SYSTEM', - ], - }, - 'link_settings': { - 'conditions': [ - ['OS=="mac"', { - 'libraries': [ - '$(SDKROOT)/usr/lib/libz.dylib', - ], - }, { - 'libraries': [ - '-lz', - ], - }], - ], - }, - }], - ['zlib_source=="embedded"', { - 'type': 'static_library', - 'include_dirs': [ - 'zlib', - ], - 'defines': [ - 'CRASHPAD_ZLIB_SOURCE_EMBEDDED', - 'HAVE_STDARG_H', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'zlib', - ], - 'defines': [ - 'CRASHPAD_ZLIB_SOURCE_EMBEDDED', - ], - }, - 'sources': [ - 'zlib/adler32.c', - 'zlib/compress.c', - 'zlib/crc32.c', - 'zlib/crc32.h', - 'zlib/crc_folding.c', - 'zlib/deflate.c', - 'zlib/deflate.h', - 'zlib/fill_window_sse.c', - 'zlib/gzclose.c', - 'zlib/gzguts.h', - 'zlib/gzlib.c', - 'zlib/gzread.c', - 'zlib/gzwrite.c', - 'zlib/infback.c', - 'zlib/inffast.c', - 'zlib/inffast.h', - 'zlib/inffixed.h', - 'zlib/inflate.c', - 'zlib/inflate.h', - 'zlib/inftrees.c', - 'zlib/inftrees.h', - 'zlib/names.h', - 'zlib/simd_stub.c', - 'zlib/trees.c', - 'zlib/trees.h', - 'zlib/uncompr.c', - 'zlib/x86.c', - 'zlib/x86.h', - 'zlib/zconf.h', - 'zlib/zlib.h', - 'zlib/zutil.c', - 'zlib/zutil.h', - 'zlib_crashpad.h', - ], - 'conditions': [ - ['target_arch=="ia32" or target_arch=="x64"', { - 'sources!': [ - 'zlib/simd_stub.c', - ], - 'cflags': [ - '-msse4.2', - '-mpclmul', - ], - 'xcode_settings': { - 'OTHER_CFLAGS': [ - '-msse4.2', - '-mpclmul', - ], - }, - }, { - 'sources!': [ - 'zlib/crc_folding.c', - 'zlib/fill_window_sse.c', - 'zlib/x86.c', - 'zlib/x86.h', - ], - }], - ['OS!="win"', { - 'defines': [ - 'HAVE_HIDDEN', - 'HAVE_UNISTD_H', - ], - }, { - 'msvs_disabled_warnings': [ - 4131, # uses old-style declarator - 4244, # conversion from 't1' to 't2', possible loss of data - 4245, # conversion from 't1' to 't2', signed/unsigned mismatch - 4267, # conversion from 'size_t' to 't', possible loss of data - 4324, # structure was padded due to alignment specifier - ], - }], - ], - }], - ['zlib_source=="external"', { - 'type': 'none', - 'direct_dependent_settings': { - 'defines': [ - 'CRASHPAD_ZLIB_SOURCE_EXTERNAL', - ], - }, - 'dependencies': [ - '../../../../zlib/zlib.gyp:zlib', - ], - }], - ], - }, - ], -} diff --git a/tools/tools.gyp b/tools/tools.gyp deleted file mode 100644 index d2ab29aa..00000000 --- a/tools/tools.gyp +++ /dev/null @@ -1,209 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../build/crashpad.gypi', - ], - 'targets': [ - { - 'target_name': 'crashpad_tool_support', - 'type': 'static_library', - 'dependencies': [ - '../third_party/mini_chromium/mini_chromium.gyp:base', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'tool_support.cc', - 'tool_support.h', - ], - }, - { - 'target_name': 'crashpad_database_util', - 'type': 'executable', - 'dependencies': [ - 'crashpad_tool_support', - '../client/client.gyp:crashpad_client', - '../compat/compat.gyp:crashpad_compat', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'crashpad_database_util.cc', - ], - }, - { - 'target_name': 'crashpad_http_upload', - 'type': 'executable', - 'dependencies': [ - 'crashpad_tool_support', - '../compat/compat.gyp:crashpad_compat', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'crashpad_http_upload.cc', - ], - }, - { - 'target_name': 'generate_dump', - 'type': 'executable', - 'dependencies': [ - 'crashpad_tool_support', - '../compat/compat.gyp:crashpad_compat', - '../minidump/minidump.gyp:crashpad_minidump', - '../snapshot/snapshot.gyp:crashpad_snapshot', - '../third_party/mini_chromium/mini_chromium.gyp:base', - '../util/util.gyp:crashpad_util', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'generate_dump.cc', - ], - 'conditions': [ - ['OS=="mac"', { - 'xcode_settings': { - 'OTHER_LDFLAGS': [ - '-sectcreate', - '__TEXT', - '__info_plist', - '<(sectaskaccess_info_plist)' - ], - }, - }], - ], - }, - ], - 'conditions': [ - ['OS=="mac"', { - 'variables': { - # Programs that use task_for_pid() can indicate to taskgated(8) in their - # Info.plist that they are allowed to call that function. In order for - # this to work, the programs in question must be signed by an authority - # trusted by the system. Signing is beyond the scope of the build, but - # the key to make this work is placed in Info.plist to enable the - # desired behavior once the tools that require this access are signed. - # - # The tools built here are flat-file executables, and are not bundled. - # To have an Info.plist, they must have a special __TEXT,__info_plist - # section. This section is created at link time. - # - # The Info.plist for this purpose is mac/sectaskaccess_info.plist and is - # referenced by OTHER_LDFLAGS. ninja runs the link step from the output - # directory such as out/Release, and requires a relative path from that - # directory. Xcode runs the link step from the directory of the - # .xcodeproj, which is the directory of the .gyp file. - 'conditions': [ - ['GENERATOR=="ninja"', { - 'sectaskaccess_info_plist': '