llvm: Add enableSharedLibraries option to 3.5 and 3.6

This commit is contained in:
Joe Hermaszewski 2016-01-13 15:21:23 +00:00
parent 8a3aa73aca
commit 9238521b1c
2 changed files with 8 additions and 4 deletions

View File

@ -13,6 +13,7 @@
, zlib
, compiler-rt_src
, debugVersion ? false
, enableSharedLibraries ? !stdenv.isDarwin
}:
let
@ -43,10 +44,11 @@ in stdenv.mkDerivation rec {
"-DLLVM_BUILD_TESTS=ON"
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_REQUIRES_RTTI=1"
] ++ stdenv.lib.optionals (!isDarwin) [
] ++ stdenv.lib.optional enableSharedLibraries
"-DBUILD_SHARED_LIBS=ON"
++ stdenv.lib.optional (!isDarwin)
"-DLLVM_BINUTILS_INCDIR=${binutils}/include"
] ++ stdenv.lib.optionals ( isDarwin) [
++ stdenv.lib.optionals ( isDarwin) [
"-DCMAKE_CXX_FLAGS=-stdlib=libc++"
"-DCAN_TARGET_i386=false"
];

View File

@ -13,6 +13,7 @@
, zlib
, compiler-rt_src
, debugVersion ? false
, enableSharedLibraries ? !stdenv.isDarwin
}:
let
@ -43,10 +44,11 @@ in stdenv.mkDerivation rec {
"-DLLVM_BUILD_TESTS=ON"
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_ENABLE_RTTI=ON"
] ++ stdenv.lib.optionals (!isDarwin) [
] ++ stdenv.lib.optional enableSharedLibraries
"-DBUILD_SHARED_LIBS=ON"
++ stdenv.lib.optional (!isDarwin)
"-DLLVM_BINUTILS_INCDIR=${binutils}/include"
] ++ stdenv.lib.optionals ( isDarwin) [
++ stdenv.lib.optionals ( isDarwin) [
"-DCMAKE_CXX_FLAGS=-stdlib=libc++"
"-DCAN_TARGET_i386=false"
];