Skip to content

Crashpad

Bobby Galli edited this page Apr 18, 2020 · 11 revisions

Install Google's depot_tools (ref)

MacOS

  • git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
  • sudo echo "export PATH=/path/to/depot_tools:$PATH" >> ~/.zshrc

Get the Crashpad source (ref)

Initial checkout

  • mkdir ~/crashpad
  • cd ~/crashpad
  • fetch crashpad

Subsequent checkouts

  • cd ~/crashpad/crashpad
  • git pull -r
  • gclient sync

Building

  • cd ~/crashpad/crashpad
  • gn gen out/Default
  • ninja -C out/Default

Building Shared Libraries (ref)

After running gn gen out\Default, you can edit the out\Default\toolchain.ninja file to add extra compiler flags to the command for the cc and cxx rules.

rule cc
  command = ninja -t msvc -e environment.amd64 -- cl.exe ... ${cflags} ${cflags_c} /c ...
                                 add the /MD compiler flag after the others, here ^
Clone this wiki locally