summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm/6
diff options
context:
space:
mode:
authorOPNA2608 <christoph.neidahl@gmail.com>2022-09-03 15:44:53 +0200
committerOPNA2608 <christoph.neidahl@gmail.com>2022-09-03 17:20:46 +0200
commit6c6f4a97242017ada74071f947e6538d353d62b2 (patch)
tree6982cfde634af8dd5612511f6bc0e6936a52c269 /pkgs/development/compilers/llvm/6
parentcef50cde2bd337c795159e8b26c7c246206b6740 (diff)
downloadnixpkgs-6c6f4a97242017ada74071f947e6538d353d62b2.tar
nixpkgs-6c6f4a97242017ada74071f947e6538d353d62b2.tar.gz
nixpkgs-6c6f4a97242017ada74071f947e6538d353d62b2.tar.bz2
nixpkgs-6c6f4a97242017ada74071f947e6538d353d62b2.tar.lz
nixpkgs-6c6f4a97242017ada74071f947e6538d353d62b2.tar.xz
nixpkgs-6c6f4a97242017ada74071f947e6538d353d62b2.tar.zst
nixpkgs-6c6f4a97242017ada74071f947e6538d353d62b2.zip
llvm*: Fix core usage in tests
lit (LLVM Integrated Tester) [0] by default uses as many threads as the build host
has cores, ignoring the user's core settings for the build.
This passes the configured core count on to lit, along with LLVM's default
settings for it which we otherwise override in the process [1].

[0]: https://www.llvm.org/docs/CommandGuide/lit.html
[1]: https://github.com/llvm/llvm-project/blob/329fda39c507e8740978d10458451dcdb21563be/llvm/CMakeLists.txt#L559-L565
Diffstat (limited to 'pkgs/development/compilers/llvm/6')
-rw-r--r--pkgs/development/compilers/llvm/6/llvm/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/6/llvm/default.nix b/pkgs/development/compilers/llvm/6/llvm/default.nix
index 61f9234274d..7bb82a99919 100644
--- a/pkgs/development/compilers/llvm/6/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/6/llvm/default.nix
@@ -149,6 +149,7 @@ stdenv.mkDerivation (rec {
     "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
     "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
     "-DLLVM_ENABLE_DUMP=ON"
+    "-DLLVM_LIT_ARGS=-svj\${NIX_BUILD_CORES}"
   ] ++ optionals enableManpages [
     "-DLLVM_BUILD_DOCS=ON"
     "-DLLVM_ENABLE_SPHINX=ON"