Code Monkey home page Code Monkey logo

crashpad's Introduction

Backtrace fork of Crashpad

This is a fork of the Crashpad project with changes provided by Backtrace I/O, a Sauce Labs Company.

The major differences:

  • addition of CMake build files, making it possible to use Crashpad as a simple CMake dependency.
  • support for native Mac OS on M1 ARM builds.

Build instructions

Please see examples for usage examples.

Windows

Initial checkout

# Clone the repository
git clone [email protected]:backtrace-labs/crashpad.git
cd crashpad
# use the `backtrace` branch:
git checkout backtrace
# initialize submodules
git submodule update --init --recursive

Ensure that Visual Studio 2019 and CMake are in the path. You can do that by running terminal from the shortcut provided by the Visual Studio Installer.

Build:

# make a build directory (note: build is already used by Crashpad)
mkdir -p cbuild && cd cbuild
# run CMake (additional options like -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE are possible)
# it is recommended to specify the compiler version used for the build
cmake -G "Visual Studio 16 2019" ..
cmake --build .

Linux

Initial checkout

# Clone the repository
git clone [email protected]:backtrace-labs/crashpad.git
cd crashpad
# use the `backtrace` branch:
git checkout backtrace
# initialize submodules
git submodule update --init --recursive

Build:

# make a build directory (note: build is already used by Crashpad)
mkdir -p cbuild && cd cbuild
# run CMake (additional options like -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE are possible)
cmake ..
# alternatively: cmake --build .
make -j

Mac OS

Initial checkout

# Clone the repository
git clone [email protected]:backtrace-labs/crashpad.git
cd crashpad
# use the `backtrace` branch:
git checkout backtrace
# initialize submodules
git submodule update --init --recursive

Choose the architecture. Available options: arm64, x86_64.

Build:

# make a build directory (note: build is already used by Crashpad)
mkdir -p cbuild && cd cbuild
# run CMake (additional options like -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE are possible)
cmake -DCMAKE_OSX_ARCHITECTURES=arm64 ..
# alternatively: cmake --build .
make -j

Android

Initial checkout

# Clone the repository
git clone [email protected]:backtrace-labs/crashpad.git
cd crashpad
# use the `backtrace` branch:
git checkout backtrace
# initialize submodules
git submodule update --init --recursive

Ensure that paths are set up for the Android SDK and NDK:

# note that you will have to adjust those paths to your installation
export SDK_HOME=/home/backtrace/code/android/sdk
export PATH=${SDK_HOME}/cmake/3.18.1/bin/:$PATH
export CMAKE=${SDK_HOME}/cmake/3.18.1/bin/cmake
export ANDROID_HOME=${SDK_HOME}
export NDK_VERSION=21.4.7075529
export NDK=${ANDROID_HOME}/ndk/${NDK_VERSION}
export TOOLCHAIN=${SDK_HOME}/ndk/${NDK_VERSION}/build/cmake/android.toolchain.cmake
export GTEST=${NDK}/sources/third_party/googletest
export API_VERSION=21
# other supported are: armeabi-v7a, x86_64. x86 (32-bit) is NOT supported
export ABI=arm64-v8a
# use OPENSSL or NONE
export HTTPS_TRANSPORT=OPENSSL

Build:

# make a build directory (note: build is already used by Crashpad)
mkdir -p cbuild && cd cbuild
# run CMake (additional options like -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE are possible)
${CMAKE} \
        -DANDROID_ABI=${ABI} \
        -DANDROID_PLATFORM=${API_VERSION} \
        -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN} \
        -DANDROID_NATIVE_API_LEVEL=${API_VERSION} \
        -DANDROID_TOOLCHAIN=clang \
        ..
# build
make -j

Crashpad

Crashpad is a crash-reporting system.

Documentation

Source Code

Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.

Other Links

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.