about summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-02-23 14:09:12 +0000
committerAlyssa Ross <hi@alyssa.is>2023-02-27 16:11:48 +0000
commit60a2f64123da7b36d1355158afc7f690f27d54b5 (patch)
treebe530d336cddabe43ca395094b2be845722c32be /pkgs/development/compilers/llvm
parentfe1c3385105bea73a5ec55edd751ce6793a525bd (diff)
downloadnixlib-60a2f64123da7b36d1355158afc7f690f27d54b5.tar
nixlib-60a2f64123da7b36d1355158afc7f690f27d54b5.tar.gz
nixlib-60a2f64123da7b36d1355158afc7f690f27d54b5.tar.bz2
nixlib-60a2f64123da7b36d1355158afc7f690f27d54b5.tar.lz
nixlib-60a2f64123da7b36d1355158afc7f690f27d54b5.tar.xz
nixlib-60a2f64123da7b36d1355158afc7f690f27d54b5.tar.zst
nixlib-60a2f64123da7b36d1355158afc7f690f27d54b5.zip
llvmPackages_git: switch to using `ninja`
Port of 912056c71ec ("llvmPackages_15: switch to using `ninja`").
Diffstat (limited to 'pkgs/development/compilers/llvm')
-rw-r--r--pkgs/development/compilers/llvm/git/clang/default.nix8
-rw-r--r--pkgs/development/compilers/llvm/git/compiler-rt/default.nix4
-rw-r--r--pkgs/development/compilers/llvm/git/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/git/libcxx/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/git/libcxxabi/default.nix4
-rw-r--r--pkgs/development/compilers/llvm/git/libunwind/default.nix3
-rw-r--r--pkgs/development/compilers/llvm/git/lld/default.nix3
-rw-r--r--pkgs/development/compilers/llvm/git/lldb/default.nix7
-rw-r--r--pkgs/development/compilers/llvm/git/llvm/default.nix12
-rw-r--r--pkgs/development/compilers/llvm/git/openmp/default.nix3
10 files changed, 26 insertions, 30 deletions
diff --git a/pkgs/development/compilers/llvm/git/clang/default.nix b/pkgs/development/compilers/llvm/git/clang/default.nix
index bf4a03a490b6..7d5e9698f7a4 100644
--- a/pkgs/development/compilers/llvm/git/clang/default.nix
+++ b/pkgs/development/compilers/llvm/git/clang/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, llvm_meta
 , monorepoSrc, runCommand
-, substituteAll, cmake, libxml2, libllvm, version, python3
+, substituteAll, cmake, ninja, libxml2, libllvm, version, python3
 , buildLlvmTools
 , fixDarwinDylibNames
 , enableManpages ? false
@@ -20,7 +20,7 @@ let
 
     sourceRoot = "${src.name}/${pname}";
 
-    nativeBuildInputs = [ cmake python3 ]
+    nativeBuildInputs = [ cmake ninja python3 ]
       ++ lib.optional enableManpages python3.pkgs.sphinx
       ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
 
@@ -112,9 +112,7 @@ let
   } // lib.optionalAttrs enableManpages {
     pname = "clang-manpages";
 
-    buildPhase = ''
-      make docs-clang-man
-    '';
+    ninjaFlags = [ "docs-clang-man" ];
 
     installPhase = ''
       mkdir -p $out/share/man/man1
diff --git a/pkgs/development/compilers/llvm/git/compiler-rt/default.nix b/pkgs/development/compilers/llvm/git/compiler-rt/default.nix
index 29509afbfdf2..aee403d6a695 100644
--- a/pkgs/development/compilers/llvm/git/compiler-rt/default.nix
+++ b/pkgs/development/compilers/llvm/git/compiler-rt/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, llvm_meta, version
 , monorepoSrc, runCommand
-, cmake, python3, xcbuild, libllvm, libcxxabi, libxcrypt
+, cmake, ninja, python3, xcbuild, libllvm, libcxxabi, libxcrypt
 , doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
 }:
 
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
   inherit src;
   sourceRoot = "${src.name}/${baseName}";
 
-  nativeBuildInputs = [ cmake python3 libllvm.dev ]
+  nativeBuildInputs = [ cmake ninja python3 libllvm.dev ]
     ++ lib.optional stdenv.isDarwin xcbuild.xcrun;
   buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
 
diff --git a/pkgs/development/compilers/llvm/git/default.nix b/pkgs/development/compilers/llvm/git/default.nix
index ffbce74a4822..00581d542bb5 100644
--- a/pkgs/development/compilers/llvm/git/default.nix
+++ b/pkgs/development/compilers/llvm/git/default.nix
@@ -1,4 +1,4 @@
-{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
 , gccForLibs, preLibcCrossHeaders
 , libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
 , buildLlvmTools # tools, but from the previous stage, for cross
@@ -40,7 +40,7 @@ let
   };
 
   tools = lib.makeExtensible (tools: let
-    callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version monorepoSrc buildLlvmTools; });
+    callPackage = newScope (tools // { inherit stdenv cmake ninja libxml2 python3 isl release_version version monorepoSrc buildLlvmTools; });
     mkExtraBuildCommands0 = cc: ''
       rsrc="$out/resource-root"
       mkdir "$rsrc"
@@ -220,7 +220,7 @@ let
   });
 
   libraries = lib.makeExtensible (libraries: let
-    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version monorepoSrc; });
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake ninja libxml2 python3 isl release_version version monorepoSrc; });
   in {
 
     compiler-rt-libc = callPackage ./compiler-rt {
diff --git a/pkgs/development/compilers/llvm/git/libcxx/default.nix b/pkgs/development/compilers/llvm/git/libcxx/default.nix
index a29edb0658d3..de4260540e92 100644
--- a/pkgs/development/compilers/llvm/git/libcxx/default.nix
+++ b/pkgs/development/compilers/llvm/git/libcxx/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, llvm_meta
 , monorepoSrc, runCommand
-, cmake, python3, fixDarwinDylibNames, version
+, cmake, ninja, python3, fixDarwinDylibNames, version
 , cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
 , libcxxabi, libcxxrt
 , enableShared ? !stdenv.hostPlatform.isStatic
@@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
     patchShebangs utils/cat_files.py
   '';
 
-  nativeBuildInputs = [ cmake python3 ]
+  nativeBuildInputs = [ cmake ninja python3 ]
     ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
 
   buildInputs = lib.optionals (!headersOnly) [ cxxabi ];
@@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
       "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
     ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
 
-  buildFlags = lib.optional headersOnly "generate-cxx-headers";
+  ninjaFlags = lib.optional headersOnly "generate-cxx-headers";
   installTargets = lib.optional headersOnly "install-cxx-headers";
 
   preInstall = lib.optionalString (stdenv.isDarwin && !headersOnly) ''
diff --git a/pkgs/development/compilers/llvm/git/libcxxabi/default.nix b/pkgs/development/compilers/llvm/git/libcxxabi/default.nix
index 3d5f875637fd..a36fb10b00ee 100644
--- a/pkgs/development/compilers/llvm/git/libcxxabi/default.nix
+++ b/pkgs/development/compilers/llvm/git/libcxxabi/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, llvm_meta, cmake, python3
+{ lib, stdenv, llvm_meta, cmake, ninja, python3
 , monorepoSrc, runCommand, fetchpatch
 , cxx-headers, libunwind, version
 , enableShared ? !stdenv.hostPlatform.isStatic
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
     cd ../runtimes
   '';
 
-  nativeBuildInputs = [ cmake python3 ];
+  nativeBuildInputs = [ cmake ninja python3 ];
   buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isWasm) libunwind;
 
   cmakeFlags = [
diff --git a/pkgs/development/compilers/llvm/git/libunwind/default.nix b/pkgs/development/compilers/llvm/git/libunwind/default.nix
index 0b59fff1357e..dd14e2acaf86 100644
--- a/pkgs/development/compilers/llvm/git/libunwind/default.nix
+++ b/pkgs/development/compilers/llvm/git/libunwind/default.nix
@@ -1,6 +1,7 @@
 { lib, stdenv, llvm_meta, version
 , monorepoSrc, runCommand
 , cmake
+, ninja
 , python3
 , enableShared ? !stdenv.hostPlatform.isStatic
 }:
@@ -41,7 +42,7 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "dev" ];
 
-  nativeBuildInputs = [ cmake python3 ];
+  nativeBuildInputs = [ cmake ninja python3 ];
 
   cmakeFlags = [
     "-DLLVM_ENABLE_RUNTIMES=libunwind"
diff --git a/pkgs/development/compilers/llvm/git/lld/default.nix b/pkgs/development/compilers/llvm/git/lld/default.nix
index 9d1776643684..03d20264de20 100644
--- a/pkgs/development/compilers/llvm/git/lld/default.nix
+++ b/pkgs/development/compilers/llvm/git/lld/default.nix
@@ -2,6 +2,7 @@
 , buildLlvmTools
 , monorepoSrc, runCommand
 , cmake
+, ninja
 , libxml2
 , libllvm
 , version
@@ -27,7 +28,7 @@ stdenv.mkDerivation rec {
     ./gnu-install-dirs.patch
   ];
 
-  nativeBuildInputs = [ cmake ];
+  nativeBuildInputs = [ cmake ninja ];
   buildInputs = [ libllvm libxml2 ];
 
   cmakeFlags = [
diff --git a/pkgs/development/compilers/llvm/git/lldb/default.nix b/pkgs/development/compilers/llvm/git/lldb/default.nix
index 6e6fe5cf0671..a02c5ca4b136 100644
--- a/pkgs/development/compilers/llvm/git/lldb/default.nix
+++ b/pkgs/development/compilers/llvm/git/lldb/default.nix
@@ -2,6 +2,7 @@
 , runCommand
 , monorepoSrc
 , cmake
+, ninja
 , zlib
 , ncurses
 , swig
@@ -49,7 +50,7 @@ stdenv.mkDerivation (rec {
   outputs = [ "out" "lib" "dev" ];
 
   nativeBuildInputs = [
-    cmake python3 which swig lit makeWrapper lua5_3
+    cmake ninja python3 which swig lit makeWrapper lua5_3
   ] ++ lib.optionals enableManpages [
     python3.pkgs.sphinx python3.pkgs.recommonmark
   ];
@@ -120,9 +121,7 @@ stdenv.mkDerivation (rec {
 } // lib.optionalAttrs enableManpages {
   pname = "lldb-manpages";
 
-  buildPhase = ''
-    make docs-lldb-man
-  '';
+  ninjaFlags = [ "docs-lldb-man" ];
 
   propagatedBuildInputs = [];
 
diff --git a/pkgs/development/compilers/llvm/git/llvm/default.nix b/pkgs/development/compilers/llvm/git/llvm/default.nix
index db9a21a56dac..6651d6347e6e 100644
--- a/pkgs/development/compilers/llvm/git/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/git/llvm/default.nix
@@ -4,6 +4,7 @@
 , runCommand
 , fetchpatch
 , cmake
+, ninja
 , python3
 , libffi
 , enableGoldPlugin ? (!stdenv.isDarwin && !stdenv.targetPlatform.isWasi)
@@ -50,7 +51,7 @@ in stdenv.mkDerivation (rec {
 
   outputs = [ "out" "lib" "dev" "python" ];
 
-  nativeBuildInputs = [ cmake python3 ]
+  nativeBuildInputs = [ cmake ninja python3 ]
     ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
 
   buildInputs = [ libxml2 libffi ]
@@ -245,15 +246,10 @@ in stdenv.mkDerivation (rec {
 } // lib.optionalAttrs enableManpages {
   pname = "llvm-manpages";
 
-  buildPhase = ''
-    make docs-llvm-man
-  '';
-
   propagatedBuildInputs = [];
 
-  installPhase = ''
-    make -C docs install
-  '';
+  ninjaFlags = [ "docs-llvm-man" ];
+  installTargets = [ "install-docs-llvm-man" ];
 
   postPatch = null;
   postInstall = null;
diff --git a/pkgs/development/compilers/llvm/git/openmp/default.nix b/pkgs/development/compilers/llvm/git/openmp/default.nix
index 9355fe667f0c..f22101e9cade 100644
--- a/pkgs/development/compilers/llvm/git/openmp/default.nix
+++ b/pkgs/development/compilers/llvm/git/openmp/default.nix
@@ -4,6 +4,7 @@
 , monorepoSrc
 , runCommand
 , cmake
+, ninja
 , llvm
 , lit
 , clang-unwrapped
@@ -32,7 +33,7 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "dev" ];
 
-  nativeBuildInputs = [ cmake perl pkg-config lit ];
+  nativeBuildInputs = [ cmake ninja perl pkg-config lit ];
   buildInputs = [ llvm ];
 
   # Unsup:Pass:XFail:Fail