diff --git a/pkgs/development/compilers/llvm/git/clang/default.nix b/pkgs/development/compilers/llvm/git/clang/default.nix index bf4a03a490b62..7d5e9698f7a4a 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 29509afbfdf27..aee403d6a6955 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 ffbce74a48220..00581d542bb5d 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 a29edb0658d30..de4260540e923 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 3d5f875637fde..a36fb10b00eef 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 0b59fff1357e1..dd14e2acaf869 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 9d17766436845..03d20264de206 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 6e6fe5cf0671d..a02c5ca4b1364 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 9a0d375df9c37..6651d6347e6ed 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 ] @@ -103,7 +104,7 @@ in stdenv.mkDerivation (rec { preConfigure = '' # Workaround for configure flags that need to have spaces cmakeFlagsArray+=( - -DLLVM_LIT_ARGS='-svj''${NIX_BUILD_CORES} --no-progress-bar' + -DLLVM_LIT_ARGS="-svj''${NIX_BUILD_CORES} --no-progress-bar" ) ''; @@ -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 9355fe667f0cc..f22101e9cade9 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