about summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm/5/clang
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2017-12-31 11:07:57 +0100
committerDaiderd Jordan <daiderd@gmail.com>2018-01-02 00:50:01 +0100
commit812f7714e26a2fdd1446b21e43642c4c023045df (patch)
tree1f44cb2d89cd79385ad537a1ceef72b11d6f7107 /pkgs/development/compilers/llvm/5/clang
parenta9f118914fe57ae6b45719717157878037d98373 (diff)
downloadnixlib-812f7714e26a2fdd1446b21e43642c4c023045df.tar
nixlib-812f7714e26a2fdd1446b21e43642c4c023045df.tar.gz
nixlib-812f7714e26a2fdd1446b21e43642c4c023045df.tar.bz2
nixlib-812f7714e26a2fdd1446b21e43642c4c023045df.tar.lz
nixlib-812f7714e26a2fdd1446b21e43642c4c023045df.tar.xz
nixlib-812f7714e26a2fdd1446b21e43642c4c023045df.tar.zst
nixlib-812f7714e26a2fdd1446b21e43642c4c023045df.zip
clang: move libclang to separate lib output
Currently clang-unwrapped can't be used as a buildInput without also
shadowing clang/clang++ of a clang based stdenv.
Diffstat (limited to 'pkgs/development/compilers/llvm/5/clang')
-rw-r--r--pkgs/development/compilers/llvm/5/clang/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/development/compilers/llvm/5/clang/default.nix b/pkgs/development/compilers/llvm/5/clang/default.nix
index fa8502ebd67a..a63b8b9cdf2a 100644
--- a/pkgs/development/compilers/llvm/5/clang/default.nix
+++ b/pkgs/development/compilers/llvm/5/clang/default.nix
@@ -50,7 +50,7 @@ let
       sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
     '';
 
-    outputs = [ "out" "python" ]
+    outputs = [ "out" "lib" "python" ]
       ++ stdenv.lib.optional enableManpages "man";
 
     # Clang expects to find LLVMgold in its own prefix
@@ -60,13 +60,15 @@ let
       ln -sv ${llvm}/lib/clang/${release_version}/lib $out/lib/clang/${release_version}/
       ln -sv $out/bin/clang $out/bin/cpp
 
+      # Move libclang to 'lib' output
+      moveToOutput "lib/libclang.*" "$lib"
+
       mkdir -p $python/bin $python/share/clang/
       mv $out/bin/{git-clang-format,scan-view} $python/bin
       if [ -e $out/bin/set-xcode-analyzer ]; then
         mv $out/bin/set-xcode-analyzer $python/bin
       fi
       mv $out/share/clang/*.py $python/share/clang
-
       rm $out/bin/c-index-test
     ''
     + stdenv.lib.optionalString enableManpages ''
@@ -80,7 +82,6 @@ let
     enableParallelBuilding = true;
 
     passthru = {
-      lib = self; # compatibility with gcc, so that `stdenv.cc.cc.lib` works on both
       isClang = true;
       inherit llvm;
     } // stdenv.lib.optionalAttrs stdenv.isLinux {