Skip to content

Make building for clang/libc++ simpler #531

Description

@kristjanvalur

Description

I need to compile on Linux to link with a project that uses clang and libc++ (rather than gcc and libstdc++)
It took me a few hours of googling and trial and error to figure out the solution.

Either it could be documented or made simpler via cmake config

When does the problem happen

  • During build
  • During run-time
  • When capturing a hard crash

Environment
Ubuntu 18, with cmake 3.30

Steps To Reproduce

To successfully compile sentry-native, the following needs to be done:

  1. Install prerequisites
  • zlib-dev
  • libssl-dev
  • clang
  • libc++-dev
  • libc++abli-dev
  1. run cmake with the following extra options:
    -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions