From eb1f60c022ad651833913d2825ecced398993a3f Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 31 May 2013 17:17:03 +0200 Subject: [PATCH] build: fix build breakage from 3fdd2a1 Make sure the android_build variable is defined. --- common.gypi | 12 +++--------- uv.gyp | 9 +++++---- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/common.gypi b/common.gypi index d264a11b..f70d5d9e 100644 --- a/common.gypi +++ b/common.gypi @@ -1,5 +1,6 @@ { 'variables': { + 'android_build%': 0, 'visibility%': 'hidden', # V8's visibility setting 'target_arch%': 'ia32', # set v8's target architecture 'host_arch%': 'ia32', # set v8's host architecture @@ -8,13 +9,6 @@ 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way 'gcc_version%': 'unknown', 'clang%': 0, - - 'conditions': [ - # Workaround for the legacy handling of android in gyp - ['android_build == 1', { - 'OS': 'android', - }], - ], }, 'target_defaults': { @@ -136,7 +130,7 @@ }] ] }], - ['OS in "android freebsd linux openbsd solaris"', { + ['OS in "freebsd linux openbsd solaris" or android_build == 1', { 'cflags': [ '-Wall' ], 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ], 'target_conditions': [ @@ -156,7 +150,7 @@ 'cflags': [ '-pthreads' ], 'ldflags': [ '-pthreads' ], }], - [ 'OS not in "android solaris"', { + [ 'OS != "solaris" and android_build == 0', { 'cflags': [ '-pthread' ], 'ldflags': [ '-pthread' ], }], diff --git a/uv.gyp b/uv.gyp index d8bbafce..6b99f4ce 100644 --- a/uv.gyp +++ b/uv.gyp @@ -1,5 +1,6 @@ { 'variables': { + 'android_build%': 0, 'uv_use_dtrace%': 'false', # uv_parent_path is the relative path to libuv in the parent project # this is only relevant when dtrace is enabled and libuv is a child project @@ -21,7 +22,7 @@ ['OS=="solaris"', { 'cflags': [ '-pthreads' ], }], - ['OS not in "android solaris"', { + ['OS != "solaris" and android_build == 0', { 'cflags': [ '-pthread' ], }], ], @@ -161,7 +162,7 @@ ['OS=="solaris"', { 'ldflags': [ '-pthreads' ], }], - ['OS not in "android solaris"', { + ['OS != "solaris" and android_build == 0', { 'ldflags': [ '-pthread' ], }], ], @@ -179,7 +180,7 @@ }], ], }], - [ 'OS in "android linux mac"', { + [ 'OS in "linux mac" or android_build == 1', { 'sources': [ 'src/unix/proctitle.c' ], }], [ 'OS=="mac"', { @@ -215,7 +216,7 @@ 'libraries': [ '-ldl', '-lrt' ], }, }], - [ 'OS=="android"', { + [ 'android_build == 1', { 'sources': [ 'src/unix/linux-core.c', 'src/unix/linux-inotify.c',