Merge pull request #26024 from Mic92/llvm-config-3.4
llvmPackages_34.llvm: fix output of llvm-config
This commit is contained in:
commit
4fecdceec2
13
pkgs/development/compilers/llvm/3.4/fix-llvm-config.patch
Normal file
13
pkgs/development/compilers/llvm/3.4/fix-llvm-config.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/utils/llvm-build/llvmbuild/main.py b/utils/llvm-build/llvmbuild/main.py
|
||||||
|
index eacefdf60bf..40d25f5cef8 100644
|
||||||
|
--- a/utils/llvm-build/llvmbuild/main.py
|
||||||
|
+++ b/utils/llvm-build/llvmbuild/main.py
|
||||||
|
@@ -412,7 +412,7 @@ subdirectories = %s
|
||||||
|
if library_name is None:
|
||||||
|
library_name_as_cstr = '0'
|
||||||
|
else:
|
||||||
|
- library_name_as_cstr = '"lib%s.a"' % library_name
|
||||||
|
+ library_name_as_cstr = '"lib%s.so"' % library_name
|
||||||
|
f.write(' { "%s", %s, %d, { %s } },\n' % (
|
||||||
|
name, library_name_as_cstr, is_installed,
|
||||||
|
', '.join('"%s"' % dep
|
@ -29,12 +29,16 @@ in stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ perl groff cmake libxml2 libffi ]
|
[ perl groff cmake libxml2 libffi python2 ] /*
|
||||||
++ stdenv.lib.optional (!stdenv.isDarwin) python2 /*
|
|
||||||
++ stdenv.lib.optional stdenv.isLinux valgrind */;
|
++ stdenv.lib.optional stdenv.isLinux valgrind */;
|
||||||
|
|
||||||
propagatedBuildInputs = [ ncurses zlib ];
|
propagatedBuildInputs = [ ncurses zlib ];
|
||||||
|
|
||||||
|
patches = stdenv.lib.optionals (!stdenv.isDarwin) [
|
||||||
|
# llvm-config --libfiles returns (non-existing) static libs
|
||||||
|
./fix-llvm-config.patch
|
||||||
|
];
|
||||||
|
|
||||||
# hacky fix: created binaries need to be run before installation
|
# hacky fix: created binaries need to be run before installation
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
mkdir -p $out/
|
mkdir -p $out/
|
||||||
@ -48,7 +52,7 @@ in stdenv.mkDerivation rec {
|
|||||||
"-DLLVM_REQUIRES_RTTI=1"
|
"-DLLVM_REQUIRES_RTTI=1"
|
||||||
"-DLLVM_BINUTILS_INCDIR=${binutils.dev or binutils}/include"
|
"-DLLVM_BINUTILS_INCDIR=${binutils.dev or binutils}/include"
|
||||||
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
||||||
] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
|
] ++ stdenv.lib.optional (!stdenv.isDarwin) "-DBUILD_SHARED_LIBS=ON";
|
||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
rm -fR $out
|
rm -fR $out
|
||||||
|
Loading…
x
Reference in New Issue
Block a user