mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-27 19:46:40 +03:00
llvmPackages_15: switch to using ninja
This commit is contained in:
parent
19d1571ee4
commit
912056c71e
10 changed files with 26 additions and 30 deletions
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, llvm_meta
|
{ lib, stdenv, llvm_meta
|
||||||
, monorepoSrc, runCommand
|
, monorepoSrc, runCommand
|
||||||
, substituteAll, cmake, libxml2, libllvm, version, python3
|
, substituteAll, cmake, ninja, libxml2, libllvm, version, python3
|
||||||
, buildLlvmTools
|
, buildLlvmTools
|
||||||
, fixDarwinDylibNames
|
, fixDarwinDylibNames
|
||||||
, enableManpages ? false
|
, enableManpages ? false
|
||||||
|
@ -20,7 +20,7 @@ let
|
||||||
|
|
||||||
sourceRoot = "${src.name}/${pname}";
|
sourceRoot = "${src.name}/${pname}";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 ]
|
nativeBuildInputs = [ cmake ninja python3 ]
|
||||||
++ lib.optional enableManpages python3.pkgs.sphinx
|
++ lib.optional enableManpages python3.pkgs.sphinx
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
||||||
|
|
||||||
|
@ -114,9 +114,7 @@ let
|
||||||
} // lib.optionalAttrs enableManpages {
|
} // lib.optionalAttrs enableManpages {
|
||||||
pname = "clang-manpages";
|
pname = "clang-manpages";
|
||||||
|
|
||||||
buildPhase = ''
|
ninjaFlags = [ "docs-clang-man" ];
|
||||||
make docs-clang-man
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/share/man/man1
|
mkdir -p $out/share/man/man1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, llvm_meta, version
|
{ lib, stdenv, llvm_meta, version
|
||||||
, monorepoSrc, runCommand
|
, monorepoSrc, runCommand
|
||||||
, cmake, python3, xcbuild, libllvm, libcxxabi, libxcrypt
|
, cmake, ninja, python3, xcbuild, libllvm, libcxxabi, libxcrypt
|
||||||
, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
|
, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ stdenv.mkDerivation {
|
||||||
inherit src;
|
inherit src;
|
||||||
sourceRoot = "${src.name}/${baseName}";
|
sourceRoot = "${src.name}/${baseName}";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 libllvm.dev ]
|
nativeBuildInputs = [ cmake ninja python3 libllvm.dev ]
|
||||||
++ lib.optional stdenv.isDarwin xcbuild.xcrun;
|
++ lib.optional stdenv.isDarwin xcbuild.xcrun;
|
||||||
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
|
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lowPrio, newScope, pkgs, lib, stdenv, stdenvNoCC, cmake
|
{ lowPrio, newScope, pkgs, lib, stdenv, stdenvNoCC, cmake, ninja
|
||||||
, gccForLibs, preLibcCrossHeaders
|
, gccForLibs, preLibcCrossHeaders
|
||||||
, libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
|
, libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||||
|
@ -41,7 +41,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
tools = lib.makeExtensible (tools: 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: ''
|
mkExtraBuildCommands0 = cc: ''
|
||||||
rsrc="$out/resource-root"
|
rsrc="$out/resource-root"
|
||||||
mkdir "$rsrc"
|
mkdir "$rsrc"
|
||||||
|
@ -220,7 +220,7 @@ let
|
||||||
});
|
});
|
||||||
|
|
||||||
libraries = lib.makeExtensible (libraries: 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 {
|
in {
|
||||||
|
|
||||||
compiler-rt-libc = callPackage ./compiler-rt {
|
compiler-rt-libc = callPackage ./compiler-rt {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, llvm_meta
|
{ lib, stdenv, llvm_meta
|
||||||
, monorepoSrc, runCommand
|
, monorepoSrc, runCommand
|
||||||
, cmake, python3, fixDarwinDylibNames, version
|
, cmake, ninja, python3, fixDarwinDylibNames, version
|
||||||
, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
|
, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
|
||||||
, libcxxabi, libcxxrt
|
, libcxxabi, libcxxrt
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||||
|
@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
|
||||||
patchShebangs utils/cat_files.py
|
patchShebangs utils/cat_files.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 ]
|
nativeBuildInputs = [ cmake ninja python3 ]
|
||||||
++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||||
|
|
||||||
buildInputs = lib.optionals (!headersOnly) [ cxxabi ];
|
buildInputs = lib.optionals (!headersOnly) [ cxxabi ];
|
||||||
|
@ -88,7 +88,7 @@ stdenv.mkDerivation rec {
|
||||||
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
||||||
];
|
];
|
||||||
|
|
||||||
buildFlags = lib.optional headersOnly "generate-cxx-headers";
|
ninjaFlags = lib.optional headersOnly "generate-cxx-headers";
|
||||||
installTargets = lib.optional headersOnly "install-cxx-headers";
|
installTargets = lib.optional headersOnly "install-cxx-headers";
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, llvm_meta, cmake, python3
|
{ lib, stdenv, llvm_meta, cmake, ninja, python3
|
||||||
, monorepoSrc, runCommand, fetchpatch
|
, monorepoSrc, runCommand, fetchpatch
|
||||||
, cxx-headers, libunwind, version
|
, cxx-headers, libunwind, version
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||||
|
@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
|
||||||
cd ../runtimes
|
cd ../runtimes
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 ];
|
nativeBuildInputs = [ cmake ninja python3 ];
|
||||||
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isWasm) libunwind;
|
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isWasm) libunwind;
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ lib, stdenv, llvm_meta, version
|
{ lib, stdenv, llvm_meta, version
|
||||||
, monorepoSrc, runCommand
|
, monorepoSrc, runCommand
|
||||||
, cmake
|
, cmake
|
||||||
|
, ninja
|
||||||
, python3
|
, python3
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||||
}:
|
}:
|
||||||
|
@ -41,7 +42,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 ];
|
nativeBuildInputs = [ cmake ninja python3 ];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DLLVM_ENABLE_RUNTIMES=libunwind"
|
"-DLLVM_ENABLE_RUNTIMES=libunwind"
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
, buildLlvmTools
|
, buildLlvmTools
|
||||||
, monorepoSrc, runCommand
|
, monorepoSrc, runCommand
|
||||||
, cmake
|
, cmake
|
||||||
|
, ninja
|
||||||
, libxml2
|
, libxml2
|
||||||
, libllvm
|
, libllvm
|
||||||
, version
|
, version
|
||||||
|
@ -27,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||||
./gnu-install-dirs.patch
|
./gnu-install-dirs.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ninja ];
|
||||||
buildInputs = [ libllvm libxml2 ];
|
buildInputs = [ libllvm libxml2 ];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
, runCommand
|
, runCommand
|
||||||
, monorepoSrc
|
, monorepoSrc
|
||||||
, cmake
|
, cmake
|
||||||
|
, ninja
|
||||||
, zlib
|
, zlib
|
||||||
, ncurses
|
, ncurses
|
||||||
, swig
|
, swig
|
||||||
|
@ -64,7 +65,7 @@ stdenv.mkDerivation (rec {
|
||||||
outputs = [ "out" "lib" "dev" ];
|
outputs = [ "out" "lib" "dev" ];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake python3 which swig lit makeWrapper lua5_3
|
cmake ninja python3 which swig lit makeWrapper lua5_3
|
||||||
] ++ lib.optionals enableManpages [
|
] ++ lib.optionals enableManpages [
|
||||||
python3.pkgs.sphinx python3.pkgs.recommonmark
|
python3.pkgs.sphinx python3.pkgs.recommonmark
|
||||||
];
|
];
|
||||||
|
@ -159,9 +160,7 @@ stdenv.mkDerivation (rec {
|
||||||
} // lib.optionalAttrs enableManpages {
|
} // lib.optionalAttrs enableManpages {
|
||||||
pname = "lldb-manpages";
|
pname = "lldb-manpages";
|
||||||
|
|
||||||
buildPhase = ''
|
ninjaFlags = [ "docs-lldb-man" ];
|
||||||
make docs-lldb-man
|
|
||||||
'';
|
|
||||||
|
|
||||||
propagatedBuildInputs = [];
|
propagatedBuildInputs = [];
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
, runCommand
|
, runCommand
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
, cmake
|
, cmake
|
||||||
|
, ninja
|
||||||
, python3
|
, python3
|
||||||
, libffi
|
, libffi
|
||||||
, libbfd
|
, libbfd
|
||||||
|
@ -49,7 +50,7 @@ in stdenv.mkDerivation (rec {
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "python" ];
|
outputs = [ "out" "lib" "dev" "python" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 ]
|
nativeBuildInputs = [ cmake ninja python3 ]
|
||||||
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
|
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
|
||||||
|
|
||||||
buildInputs = [ libxml2 libffi ]
|
buildInputs = [ libxml2 libffi ]
|
||||||
|
@ -245,15 +246,10 @@ in stdenv.mkDerivation (rec {
|
||||||
} // lib.optionalAttrs enableManpages {
|
} // lib.optionalAttrs enableManpages {
|
||||||
pname = "llvm-manpages";
|
pname = "llvm-manpages";
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
make docs-llvm-man
|
|
||||||
'';
|
|
||||||
|
|
||||||
propagatedBuildInputs = [];
|
propagatedBuildInputs = [];
|
||||||
|
|
||||||
installPhase = ''
|
ninjaFlags = [ "docs-llvm-man" ];
|
||||||
make -C docs install
|
installTargets = [ "install-docs-llvm-man" ];
|
||||||
'';
|
|
||||||
|
|
||||||
postPatch = null;
|
postPatch = null;
|
||||||
postInstall = null;
|
postInstall = null;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
, monorepoSrc
|
, monorepoSrc
|
||||||
, runCommand
|
, runCommand
|
||||||
, cmake
|
, cmake
|
||||||
|
, ninja
|
||||||
, llvm
|
, llvm
|
||||||
, targetLlvm
|
, targetLlvm
|
||||||
, lit
|
, lit
|
||||||
|
@ -33,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake perl pkg-config lit ];
|
nativeBuildInputs = [ cmake ninja perl pkg-config lit ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
(if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
|
(if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue