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 changed files with 11 additions and 18 deletions
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, makeWrapper, which
|
||||
{ stdenv, fetchurl, makeWrapper, ninja, which
|
||||
|
||||
# default dependencies
|
||||
, bzip2, flac, speex
|
||||
|
@ -165,28 +165,21 @@ in stdenv.mkDerivation rec {
|
|||
target_arch = "ia32";
|
||||
});
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
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";
|
||||
CXX = "${gcc}/bin/g++";
|
||||
in [
|
||||
"CC=${CC}"
|
||||
"CXX=${CXX}"
|
||||
"CC.host=${CC}"
|
||||
"CXX.host=${CXX}"
|
||||
"LINK.host=${CXX}"
|
||||
];
|
||||
|
||||
buildFlags = [
|
||||
"BUILDTYPE=${buildType}"
|
||||
"library=shared_library"
|
||||
"chrome"
|
||||
] ++ optional (!enableSELinux) "chrome_sandbox";
|
||||
in ''
|
||||
CC="${CC}" CC_host="${CC}" \
|
||||
CXX="${CXX}" CXX_host="${CXX}" \
|
||||
LINK_host="${CXX}" \
|
||||
"${ninja}/bin/ninja" -C "out/${buildType}" \
|
||||
-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES \
|
||||
chrome ${optionalString (!enableSELinux) "chrome_sandbox"}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -vp "${libExecPath}"
|
||||
|
|
Loading…
Reference in a new issue