Merge pull request #12363 from expipiplus1/llvm-enable-shared

llvm: Add enableSharedLibraries option to 3.5 and 3.6
This commit is contained in:
Tobias Geerinckx-Rice 2016-01-18 01:41:25 +01:00
commit 837594fe6b
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"
];