33: ${HOST:? } # GNU target triplet
44
55# You may also override the following:
6- : ${api_level:= 21 } # Minimum Android API level the build will run on
6+ : ${api_level:= 24 } # Minimum Android API level the build will run on
77: ${PREFIX:- } # Path in which to find required libraries
88
99
@@ -24,7 +24,7 @@ fail() {
2424# * https://android.googlesource.com/platform/ndk/+/ndk-rXX-release/docs/BuildSystemMaintainers.md
2525# where XX is the NDK version. Do a diff against the version you're upgrading from, e.g.:
2626# https://android.googlesource.com/platform/ndk/+/ndk-r25-release..ndk-r26-release/docs/BuildSystemMaintainers.md
27- ndk_version=26.2.11394342
27+ ndk_version=27.1.12297006
2828
2929ndk=$ANDROID_HOME /ndk/$ndk_version
3030if ! [ -e $ndk ]; then
@@ -58,8 +58,8 @@ for path in "$AR" "$AS" "$CC" "$CXX" "$LD" "$NM" "$RANLIB" "$READELF" "$STRIP";
5858 fi
5959done
6060
61- export CFLAGS=" "
62- export LDFLAGS=" -Wl,--build-id=sha1 -Wl,--no-rosegment"
61+ export CFLAGS=" -D__BIONIC_NO_PAGE_SIZE_MACRO "
62+ export LDFLAGS=" -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,-z,max-page-size=16384 "
6363
6464# Unlike Linux, Android does not implicitly use a dlopened library to resolve
6565# relocations in subsequently-loaded libraries, even if RTLD_GLOBAL is used
@@ -85,6 +85,10 @@ if [ -n "${PREFIX:-}" ]; then
8585 export PKG_CONFIG_LIBDIR=" $abs_prefix /lib/pkgconfig"
8686fi
8787
88+ # When compiling C++, some build systems will combine CFLAGS and CXXFLAGS, and some will
89+ # use CXXFLAGS alone.
90+ export CXXFLAGS=$CFLAGS
91+
8892# Use the same variable name as conda-build
8993if [ $( uname) = " Darwin" ]; then
9094 export CPU_COUNT=$( sysctl -n hw.ncpu)
0 commit comments