summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2017-06-16 16:21:48 +0100
committerJörg Thalheim <joerg@thalheim.io>2017-06-16 16:23:42 +0100
commit7d126080695d2f84c440953735c6be087074e7c3 (patch)
treed060152dbb1544295e901bfeaa40c8e9cd6c1021 /pkgs/development/compilers/llvm
parent100cd2af5aadfb457037a989a0ac5c4437b66ea5 (diff)
downloadnixlib-7d126080695d2f84c440953735c6be087074e7c3.tar
nixlib-7d126080695d2f84c440953735c6be087074e7c3.tar.gz
nixlib-7d126080695d2f84c440953735c6be087074e7c3.tar.bz2
nixlib-7d126080695d2f84c440953735c6be087074e7c3.tar.lz
nixlib-7d126080695d2f84c440953735c6be087074e7c3.tar.xz
nixlib-7d126080695d2f84c440953735c6be087074e7c3.tar.zst
nixlib-7d126080695d2f84c440953735c6be087074e7c3.zip
llvmPackages_3.7: fix libnames output of llvm-config
see also 4c4f50ce76aeeaa5fb66b66012f67dd878d1fbc7
Diffstat (limited to 'pkgs/development/compilers/llvm')
-rw-r--r--pkgs/development/compilers/llvm/3.7/fix-llvm-config.patch13
-rw-r--r--pkgs/development/compilers/llvm/3.7/llvm.nix5
2 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/3.7/fix-llvm-config.patch b/pkgs/development/compilers/llvm/3.7/fix-llvm-config.patch
new file mode 100644
index 000000000000..772c49609275
--- /dev/null
+++ b/pkgs/development/compilers/llvm/3.7/fix-llvm-config.patch
@@ -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
diff --git a/pkgs/development/compilers/llvm/3.7/llvm.nix b/pkgs/development/compilers/llvm/3.7/llvm.nix
index d4e7c73ad0de..1bdefd214f96 100644
--- a/pkgs/development/compilers/llvm/3.7/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.7/llvm.nix
@@ -53,6 +53,11 @@ in stdenv.mkDerivation rec {
     ln -sv $PWD/lib $out
   '';
 
+  patches = stdenv.lib.optionals (!stdenv.isDarwin) [
+    # llvm-config --libfiles returns (non-existing) static libs
+    ./fix-llvm-config.patch
+  ];
+
   cmakeFlags = with stdenv; [
     "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
     "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc