Merge pull request #10202 from abbradar/llvm-debug

llvm: add debug builds support
This commit is contained in:
Nikolay Amiantov 2015-10-19 11:15:56 +03:00
commit d5a532ea8d
5 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl, groff, cmake, python, libffi, binutils }:
{ stdenv, fetchurl, perl, groff, cmake, python, libffi, binutils, debugVersion ? false }:
let
version = "3.3";
in stdenv.mkDerivation rec {
@ -34,7 +34,7 @@ in stdenv.mkDerivation rec {
in "export ${LD}_LIBRARY_PATH='$$${LD}_LIBRARY_PATH:'`pwd`/lib";
cmakeFlags = with stdenv; [
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
"-DLLVM_BUILD_TESTS=ON"
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_BINUTILS_INCDIR=${binutils}/include"

View File

@ -12,6 +12,7 @@
, version
, zlib
, compiler-rt_src
, debugVersion ? false
}:
let
@ -41,7 +42,7 @@ in stdenv.mkDerivation rec {
'';
cmakeFlags = with stdenv; [
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
"-DLLVM_BUILD_TESTS=ON"
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_REQUIRES_RTTI=1"

View File

@ -12,6 +12,7 @@
, version
, zlib
, compiler-rt_src
, debugVersion ? false
}:
let
@ -38,7 +39,7 @@ in stdenv.mkDerivation rec {
'';
cmakeFlags = with stdenv; [
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
"-DLLVM_BUILD_TESTS=ON"
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_REQUIRES_RTTI=1"

View File

@ -12,6 +12,7 @@
, version
, zlib
, compiler-rt_src
, debugVersion ? false
}:
let
@ -38,7 +39,7 @@ in stdenv.mkDerivation rec {
'';
cmakeFlags = with stdenv; [
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
"-DLLVM_BUILD_TESTS=ON"
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_ENABLE_RTTI=ON"

View File

@ -12,6 +12,7 @@
, version
, zlib
, compiler-rt_src
, debugVersion ? false
}:
let
@ -38,7 +39,7 @@ in stdenv.mkDerivation rec {
'';
cmakeFlags = with stdenv; [
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
"-DLLVM_BUILD_TESTS=ON"
"-DLLVM_ENABLE_FFI=ON"