chromium: Switch build system to ninja.
Wanted to do this a long time ago, but never had a reason to do it. But with Chromium 29 having no make target for chrome_sandbox, we now use ninja as well as the official build and most other distributions. The whole build/make flags cruft is now integrated into one buildPhase override and we just call ninja there by exporting the specific variables. And this also makes enableParallelBuilding obsolete, as we use NIX_BUILD_CORES directly now. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
bdeee9bcc4
commit
e7a57971c1
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, makeWrapper, which
|
{ stdenv, fetchurl, makeWrapper, ninja, which
|
||||||
|
|
||||||
# default dependencies
|
# default dependencies
|
||||||
, bzip2, flac, speex
|
, bzip2, flac, speex
|
||||||
@ -165,28 +165,21 @@ in stdenv.mkDerivation rec {
|
|||||||
target_arch = "ia32";
|
target_arch = "ia32";
|
||||||
});
|
});
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
python build/gyp_chromium --depth "$(pwd)" ${gypFlags}
|
GYP_GENERATORS=ninja python build/gyp_chromium --depth "$(pwd)" ${gypFlags}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = let
|
buildPhase = let
|
||||||
CC = "${gcc}/bin/gcc";
|
CC = "${gcc}/bin/gcc";
|
||||||
CXX = "${gcc}/bin/g++";
|
CXX = "${gcc}/bin/g++";
|
||||||
in [
|
in ''
|
||||||
"CC=${CC}"
|
CC="${CC}" CC_host="${CC}" \
|
||||||
"CXX=${CXX}"
|
CXX="${CXX}" CXX_host="${CXX}" \
|
||||||
"CC.host=${CC}"
|
LINK_host="${CXX}" \
|
||||||
"CXX.host=${CXX}"
|
"${ninja}/bin/ninja" -C "out/${buildType}" \
|
||||||
"LINK.host=${CXX}"
|
-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES \
|
||||||
];
|
chrome ${optionalString (!enableSELinux) "chrome_sandbox"}
|
||||||
|
'';
|
||||||
buildFlags = [
|
|
||||||
"BUILDTYPE=${buildType}"
|
|
||||||
"library=shared_library"
|
|
||||||
"chrome"
|
|
||||||
] ++ optional (!enableSELinux) "chrome_sandbox";
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -vp "${libExecPath}"
|
mkdir -vp "${libExecPath}"
|
||||||
|
Loading…
Reference in New Issue
Block a user