v8_3_16_14: fix OS X build
Issues addressed:
- xcode build failed with
... was built for newer OSX version (10.10) than being linked (10.5)
fixed by setting GYP mac deployment target to the nix value
- a gyp bug when SDKROOT is not set (and removed an orphaned gyp patch
- path to python in generated gyp-mac-tool
- noisy build due to static assert warnings, by silencing warnings
- use of system xcodebuild and libtool replaced by darwin.cctools
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchurl, gyp, readline, python, which, icu, utillinux}:
|
||||
{ stdenv, lib, fetchurl, gyp, readline, python, which, icu, utillinux, cctools }:
|
||||
|
||||
assert readline != null;
|
||||
|
||||
@@ -24,9 +24,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configurePhase = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
ln -s /usr/bin/xcodebuild $TMPDIR
|
||||
ln -s /usr/bin/libtool $TMPDIR
|
||||
export PATH=$TMPDIR:$PATH
|
||||
export GYP_DEFINES="mac_deployment_target=$MACOSX_DEPLOYMENT_TARGET"
|
||||
'' + ''
|
||||
PYTHONPATH="tools/generate_shim_headers:$PYTHONPATH" \
|
||||
${gyp}/bin/gyp \
|
||||
@@ -41,12 +39,16 @@ stdenv.mkDerivation rec {
|
||||
${lib.optionalString armHardFloat "-Dv8_use_arm_eabi_hardfloat=true"} \
|
||||
--depth=. -Ibuild/standalone.gypi \
|
||||
build/all.gyp
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
sed -i 's@/usr/bin/env python@${python}/bin/python@g' out/gyp-mac-tool
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ which ];
|
||||
buildInputs = [ readline python icu ] ++ lib.optional stdenv.isLinux utillinux;
|
||||
buildInputs = [ readline python icu ]
|
||||
++ lib.optional stdenv.isLinux utillinux
|
||||
++ lib.optional stdenv.isDarwin cctools;
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error -w";
|
||||
|
||||
buildFlags = [
|
||||
"-C out"
|
||||
|
||||
Reference in New Issue
Block a user