From 6945aa7085f97c5902c042df99de772136d08ee7 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 16 Jul 2016 16:17:41 +0200 Subject: [PATCH] build: don't link against liblog on host system Don't link binaries that run on the host system against liblog, it breaks cross-compiling for android. Fixes: https://github.com/nodejs/node/issues/7731 PR-URL: https://github.com/nodejs/node/pull/7762 Reviewed-By: Anna Henningsen --- common.gypi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/common.gypi b/common.gypi index 646db0d7bbb..5eea907a0ef 100644 --- a/common.gypi +++ b/common.gypi @@ -301,9 +301,13 @@ }], ], }], - [ 'OS=="android"', { - 'defines': ['_GLIBCXX_USE_C99_MATH'], - 'libraries': [ '-llog' ], + ['OS=="android"', { + 'target_conditions': [ + ['_toolset=="target"', { + 'defines': [ '_GLIBCXX_USE_C99_MATH' ], + 'libraries': [ '-llog' ], + }], + ], }], ['OS=="mac"', { 'defines': ['_DARWIN_USE_64_BIT_INODE=1'],