From 8eed584a6d031e41c171ceb8e131e5809453c4e9 Mon Sep 17 00:00:00 2001 From: Peter Waller
Date: Fri, 25 Apr 2025 09:05:38 +0100 Subject: [PATCH] llvmPackages.{clang,mlir}: Mark big-parallel Mark these packages as big-parallel to match llvmPackages.llvm. They are chosen because they are relatively expensive to build, as opposed to others where I currently believe they are less of an issue from a CPU time/memory standpoint. I suspect most people don't care about big-parallel or it would have been noticed earlier. I have a use case where I am building many variants of clang all at once and I want to avoid OOM by constraining the number of parallel builds of items marked big-parallel. Signed-off-by: Peter Waller
--- pkgs/development/compilers/llvm/common/clang/default.nix | 1 + pkgs/development/compilers/llvm/common/mlir/default.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/pkgs/development/compilers/llvm/common/clang/default.nix b/pkgs/development/compilers/llvm/common/clang/default.nix index c5565ca405b8..d35328a9e62d 100644 --- a/pkgs/development/compilers/llvm/common/clang/default.nix +++ b/pkgs/development/compilers/llvm/common/clang/default.nix @@ -298,6 +298,7 @@ stdenv.mkDerivation ( ++ (finalAttrs.passthru.hardeningUnsupportedFlags or [ ]); }; + requiredSystemFeatures = [ "big-parallel" ]; meta = llvm_meta // { homepage = "https://clang.llvm.org/"; description = "C language family frontend for LLVM"; diff --git a/pkgs/development/compilers/llvm/common/mlir/default.nix b/pkgs/development/compilers/llvm/common/mlir/default.nix index 40733ac29bb5..d3d4a03ba7a7 100644 --- a/pkgs/development/compilers/llvm/common/mlir/default.nix +++ b/pkgs/development/compilers/llvm/common/mlir/default.nix @@ -87,6 +87,7 @@ stdenv.mkDerivation (finalAttrs: { "dev" ]; + requiredSystemFeatures = [ "big-parallel" ]; meta = llvm_meta // { # Very broken since the dependencies aren't propagating at all with tblgen through the CMake. broken = lib.versionAtLeast release_version "20";