libcxx: don't produce shared libs on musl

This commit is contained in:
Nicolas Mattia 2019-10-02 13:28:21 +02:00
parent e494de20b3
commit fadd37ba46

View file

@ -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 { stdenv.mkDerivation {
pname = "libc++"; pname = "libc++";
@ -31,7 +32,8 @@ stdenv.mkDerivation {
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
"-DLIBCXX_LIBCPPABI_VERSION=2" "-DLIBCXX_LIBCPPABI_VERSION=2"
"-DLIBCXX_CXX_ABI=libcxxabi" "-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; enableParallelBuilding = true;