summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/compilers/llvm/8/libunwind.nix4
-rw-r--r--pkgs/top-level/static.nix4
2 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/compilers/llvm/8/libunwind.nix b/pkgs/development/compilers/llvm/8/libunwind.nix
index 64832002853..75edd1fff54 100644
--- a/pkgs/development/compilers/llvm/8/libunwind.nix
+++ b/pkgs/development/compilers/llvm/8/libunwind.nix
@@ -1,4 +1,4 @@
-{ stdenv, version, fetch, cmake, fetchpatch }:
+{ stdenv, version, fetch, cmake, fetchpatch, enableShared ? true }:
 
 stdenv.mkDerivation {
   name = "libunwind-${version}";
@@ -19,4 +19,6 @@ stdenv.mkDerivation {
   ];
 
   enableParallelBuilding = true;
+
+  cmakeFlags = stdenv.lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
 }
diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix
index 108c6006fb6..eac84cfc1a8 100644
--- a/pkgs/top-level/static.nix
+++ b/pkgs/top-level/static.nix
@@ -163,9 +163,11 @@ in {
         enableShared = false;
         inherit libcxxabi;
       };
+      libunwind = super.llvmPackages_8.libraries.libunwind.override {
+        enableShared = false;
+      };
     };
   };
 
   python27 = super.python27.override { static = true; };
-
 }