diff options
Diffstat (limited to 'pkgs/development/compilers/llvm/9/default.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/9/default.nix | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/pkgs/development/compilers/llvm/9/default.nix b/pkgs/development/compilers/llvm/9/default.nix index 6f5bdb8e8cc10..e381b1927661c 100644 --- a/pkgs/development/compilers/llvm/9/default.nix +++ b/pkgs/development/compilers/llvm/9/default.nix @@ -1,4 +1,4 @@ -{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs +{ lowPrio, newScope, pkgs, lib, stdenv, cmake, gccForLibs , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith , buildPackages , buildLlvmTools # tools, but from the previous stage, for cross @@ -17,7 +17,7 @@ let clang-tools-extra_src = fetch "clang-tools-extra" "01vgzd4k1q93nfs8gyl83mjlc4x0qsgfqw32lacbjzdxg0mdfvxj"; - tools = stdenv.lib.makeExtensible (tools: let + tools = lib.makeExtensible (tools: let callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); mkExtraBuildCommands = cc: '' rsrc="$out/resource-root" @@ -25,7 +25,7 @@ let ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) '' + '' + lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) '' echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags ''; in { @@ -100,15 +100,15 @@ let extraPackages = [ targetLlvmLibraries.libcxxabi targetLlvmLibraries.compiler-rt - ] ++ stdenv.lib.optionals (!stdenv.targetPlatform.isWasm) [ + ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [ targetLlvmLibraries.libunwind ]; extraBuildCommands = '' echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString (!stdenv.targetPlatform.isWasm) '' + '' + lib.optionalString (!stdenv.targetPlatform.isWasm) '' echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString stdenv.targetPlatform.isWasm '' + '' + lib.optionalString stdenv.targetPlatform.isWasm '' echo "-fno-exceptions" >> $out/nix-support/cc-cflags '' + mkExtraBuildCommands cc; }; @@ -160,12 +160,12 @@ let }); - libraries = stdenv.lib.makeExtensible (libraries: let + libraries = lib.makeExtensible (libraries: let callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); in { compiler-rt = callPackage ./compiler-rt.nix ({} // - (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) { + (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) { stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt; })); @@ -174,12 +174,12 @@ let libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang; libcxx = callPackage ./libc++ ({} // - (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) { + (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) { stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx; })); libcxxabi = callPackage ./libc++abi.nix ({} // - (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) { + (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) { stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx; libunwind = libraries.libunwind; })); @@ -187,7 +187,7 @@ let openmp = callPackage ./openmp.nix {}; libunwind = callPackage ./libunwind.nix ({} // - (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) { + (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) { stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx; })); |