diff options
Diffstat (limited to 'pkgs/development/compilers/llvm/8/default.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/8/default.nix | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/pkgs/development/compilers/llvm/8/default.nix b/pkgs/development/compilers/llvm/8/default.nix index 6d6d8b4f7830c..3e7ef892e3dbe 100644 --- a/pkgs/development/compilers/llvm/8/default.nix +++ b/pkgs/development/compilers/llvm/8/default.nix @@ -1,6 +1,5 @@ { lowPrio, newScope, pkgs, lib, stdenv, cmake, gccForLibs , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith -, buildPackages , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -18,43 +17,50 @@ let clang-tools-extra_src = fetch "clang-tools-extra" "1qf3097bc5ia8p6cpmbx985rjr3yaah5s8fc0nv7pw742yv7jw8q"; tools = lib.makeExtensible (tools: let - callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; }); mkExtraBuildCommands = cc: '' rsrc="$out/resource-root" mkdir "$rsrc" - ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" + ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc" ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags ''; + in { - llvm = callPackage ./llvm { }; + libllvm = callPackage ./llvm { }; + + # `llvm` historically had the binaries. But this migration + # technique also impedes `lib.get*`. Perhaps we will revisit it. + llvm = tools.libllvm.out; + + libllvm-polly = callPackage ./llvm { enablePolly = true; }; - llvm-polly = callPackage ./llvm { enablePolly = true; }; + llvm-polly = tools.libllvm-polly.lib; - clang-unwrapped = callPackage ./clang { - inherit (tools) lld; + libclang = callPackage ./clang { inherit clang-tools-extra_src; }; + + clang-unwrapped = tools.libclang.out; + clang-polly-unwrapped = callPackage ./clang { inherit clang-tools-extra_src; - llvm = tools.llvm-polly; + libllvm = tools.libllvm-polly; enablePolly = true; }; # disabled until recommonmark supports sphinx 3 - #llvm-manpages = lowPrio (tools.llvm.override { + #llvm-manpages = lowPrio (tools.libllvm.override { # enableManpages = true; # python3 = pkgs.python3; # don't use python-boot #}); - clang-manpages = lowPrio (tools.clang-unwrapped.override { + clang-manpages = lowPrio (tools.libclang.override { enableManpages = true; python3 = pkgs.python3; # don't use python-boot }); - libclang = tools.clang-unwrapped.lib; - clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang; libstdcxxClang = wrapCCWith rec { |