From fadd37ba4688e024fbe57f08b0209a42dd6fba3e Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Wed, 2 Oct 2019 13:28:21 +0200 Subject: [PATCH] libcxx: don't produce shared libs on musl --- pkgs/development/compilers/llvm/7/libc++/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/llvm/7/libc++/default.nix b/pkgs/development/compilers/llvm/7/libc++/default.nix index 7a0716a6eb38..f6f9970d7a6e 100644 --- a/pkgs/development/compilers/llvm/7/libc++/default.nix +++ b/pkgs/development/compilers/llvm/7/libc++/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, fetch, cmake, python, libcxxabi, fixDarwinDylibNames, version }: +{ lib, stdenv, fetch, cmake, python, libcxxabi, fixDarwinDylibNames, version +, enableShared ? ! stdenv.hostPlatform.isMusl }: stdenv.mkDerivation { pname = "libc++"; @@ -31,7 +32,8 @@ stdenv.mkDerivation { "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" "-DLIBCXX_LIBCPPABI_VERSION=2" "-DLIBCXX_CXX_ABI=libcxxabi" - ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "-DLIBCXX_HAS_MUSL_LIBC=1"; + ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "-DLIBCXX_HAS_MUSL_LIBC=1" + ++ stdenv.lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF" ; enableParallelBuilding = true;