diff options
Diffstat (limited to 'pkgs/development/compilers/llvm/10/default.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/10/default.nix | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/pkgs/development/compilers/llvm/10/default.nix b/pkgs/development/compilers/llvm/10/default.nix index 3d2cb3544b9ff..f939eb52122ec 100644 --- a/pkgs/development/compilers/llvm/10/default.nix +++ b/pkgs/development/compilers/llvm/10/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" "06n1yp638rh24xdxv9v2df0qajxbjz4w59b7dd4ky36drwmpi4yh"; - 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" @@ -26,7 +26,7 @@ let ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share" 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 { @@ -101,15 +101,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; }; @@ -161,12 +161,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; })); @@ -175,12 +175,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; })); @@ -188,7 +188,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; })); |