Unverified Commit 3307afa9 authored by Marcus Ramberg's avatar Marcus Ramberg Committed by GitHub
Browse files

cpptrace: enable libunwind support (#516418)

parents 7d140e35 b8025a61
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
  cmake,
  pkg-config,
  libdwarf,
  libunwind,
  gtest,
  callPackage,
  zstd,
@@ -32,9 +33,18 @@ stdenv.mkDerivation (finalAttrs: {
    pkg-config
  ];

  buildInputs = [ (lib.getDev libdwarf) ];
  buildInputs = [
    (lib.getDev libdwarf)
    libunwind
  ];

  propagatedBuildInputs = [ zstd ] ++ (lib.optionals static [ libdwarf ]);
  propagatedBuildInputs = [
    zstd
  ]
  ++ (lib.optionals static [
    libdwarf
    libunwind
  ]);

  cmakeFlags = [
    (lib.cmakeBool "CPPTRACE_USE_EXTERNAL_LIBDWARF" true)
@@ -42,6 +52,7 @@ stdenv.mkDerivation (finalAttrs: {
    (lib.cmakeBool "BUILD_SHARED_LIBS" (!static))
    (lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
    (lib.cmakeBool "CPPTRACE_USE_EXTERNAL_GTEST" true)
    (lib.cmakeBool "CPPTRACE_UNWIND_WITH_LIBUNWIND" true)
  ];

  checkInputs = [ gtest ];