From f564ed4e05c9859d7b27a9f947f20f7a0d09e236 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 57d940239150df..a82bb56bc5f5b6 100644 --- a/android_configure.py +++ b/android_configure.py @@ -70,6 +70,7 @@ def patch_android(): 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 519ddcd28e6524..4c856c0912260c 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' ] }], ],