mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
Merge pull request #10202 from abbradar/llvm-debug
llvm: add debug builds support
This commit is contained in:
commit
d5a532ea8d
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, perl, groff, cmake, python, libffi, binutils }:
|
{ stdenv, fetchurl, perl, groff, cmake, python, libffi, binutils, debugVersion ? false }:
|
||||||
let
|
let
|
||||||
version = "3.3";
|
version = "3.3";
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
@ -34,7 +34,7 @@ in stdenv.mkDerivation rec {
|
|||||||
in "export ${LD}_LIBRARY_PATH='$$${LD}_LIBRARY_PATH:'`pwd`/lib";
|
in "export ${LD}_LIBRARY_PATH='$$${LD}_LIBRARY_PATH:'`pwd`/lib";
|
||||||
|
|
||||||
cmakeFlags = with stdenv; [
|
cmakeFlags = with stdenv; [
|
||||||
"-DCMAKE_BUILD_TYPE=Release"
|
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||||
"-DLLVM_BUILD_TESTS=ON"
|
"-DLLVM_BUILD_TESTS=ON"
|
||||||
"-DLLVM_ENABLE_FFI=ON"
|
"-DLLVM_ENABLE_FFI=ON"
|
||||||
"-DLLVM_BINUTILS_INCDIR=${binutils}/include"
|
"-DLLVM_BINUTILS_INCDIR=${binutils}/include"
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
, version
|
, version
|
||||||
, zlib
|
, zlib
|
||||||
, compiler-rt_src
|
, compiler-rt_src
|
||||||
|
, debugVersion ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -41,7 +42,7 @@ in stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = with stdenv; [
|
cmakeFlags = with stdenv; [
|
||||||
"-DCMAKE_BUILD_TYPE=Release"
|
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||||
"-DLLVM_BUILD_TESTS=ON"
|
"-DLLVM_BUILD_TESTS=ON"
|
||||||
"-DLLVM_ENABLE_FFI=ON"
|
"-DLLVM_ENABLE_FFI=ON"
|
||||||
"-DLLVM_REQUIRES_RTTI=1"
|
"-DLLVM_REQUIRES_RTTI=1"
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
, version
|
, version
|
||||||
, zlib
|
, zlib
|
||||||
, compiler-rt_src
|
, compiler-rt_src
|
||||||
|
, debugVersion ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -38,7 +39,7 @@ in stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = with stdenv; [
|
cmakeFlags = with stdenv; [
|
||||||
"-DCMAKE_BUILD_TYPE=Release"
|
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||||
"-DLLVM_BUILD_TESTS=ON"
|
"-DLLVM_BUILD_TESTS=ON"
|
||||||
"-DLLVM_ENABLE_FFI=ON"
|
"-DLLVM_ENABLE_FFI=ON"
|
||||||
"-DLLVM_REQUIRES_RTTI=1"
|
"-DLLVM_REQUIRES_RTTI=1"
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
, version
|
, version
|
||||||
, zlib
|
, zlib
|
||||||
, compiler-rt_src
|
, compiler-rt_src
|
||||||
|
, debugVersion ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -38,7 +39,7 @@ in stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = with stdenv; [
|
cmakeFlags = with stdenv; [
|
||||||
"-DCMAKE_BUILD_TYPE=Release"
|
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||||
"-DLLVM_BUILD_TESTS=ON"
|
"-DLLVM_BUILD_TESTS=ON"
|
||||||
"-DLLVM_ENABLE_FFI=ON"
|
"-DLLVM_ENABLE_FFI=ON"
|
||||||
"-DLLVM_ENABLE_RTTI=ON"
|
"-DLLVM_ENABLE_RTTI=ON"
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
, version
|
, version
|
||||||
, zlib
|
, zlib
|
||||||
, compiler-rt_src
|
, compiler-rt_src
|
||||||
|
, debugVersion ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -38,7 +39,7 @@ in stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = with stdenv; [
|
cmakeFlags = with stdenv; [
|
||||||
"-DCMAKE_BUILD_TYPE=Release"
|
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
|
||||||
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
|
||||||
"-DLLVM_BUILD_TESTS=ON"
|
"-DLLVM_BUILD_TESTS=ON"
|
||||||
"-DLLVM_ENABLE_FFI=ON"
|
"-DLLVM_ENABLE_FFI=ON"
|
||||||
|
Loading…
Reference in New Issue
Block a user