From 16ac5e1ca837f5f3f1bd2a365d0aed3d71b2803c Mon Sep 17 00:00:00 2001 From: MatteoBax <98881971+MatteoBax@users.noreply.github.com> Date: Fri, 29 Sep 2023 14:34:21 +0200 Subject: [PATCH] zlib: fix discovery of cpu-features.h for android Fixed cpu-features.h not found issue. Co-Authored-By: Luigi Pinca Fixes: https://github.com/nodejs/node/issues/49766 PR-URL: https://github.com/nodejs/node/pull/49828 Reviewed-By: Ben Noordhuis Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau --- android_configure.py | 1 + common.gypi | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/android_configure.py b/android_configure.py index 57d94023915..a82bb56bc5f 100644 --- a/android_configure.py +++ b/android_configure.py @@ -70,6 +70,7 @@ GYP_DEFINES = "target_arch=" + arch GYP_DEFINES += " v8_target_arch=" + arch GYP_DEFINES += " android_target_arch=" + arch GYP_DEFINES += " host_os=" + host_os + " OS=android" +GYP_DEFINES += " android_ndk_path=" + android_ndk_path os.environ['GYP_DEFINES'] = GYP_DEFINES if os.path.exists("./configure"): diff --git a/common.gypi b/common.gypi index 909d09934a1..bbf9522a2f8 100644 --- a/common.gypi +++ b/common.gypi @@ -230,7 +230,7 @@ ], },], ['OS == "android"', { - 'cflags': [ '-fPIC' ], + 'cflags': [ '-fPIC', '-I<(android_ndk_path)/sources/android/cpufeatures' ], 'ldflags': [ '-fPIC' ] }], ],