• Home
  • Raw
  • Download

Lines Matching +full:ndk +full:- +full:path

2 : ${ANDROID_HOME:?}  # Path to Android SDK
7 : ${PREFIX:-} # Path in which to find required libraries
10 # Print all messages on stderr so they're visible when running within build-wheel.
20 # When moving to a new version of the NDK, carefully review the following:
22 # * https://developer.android.com/ndk/downloads/revision_history
24 # * https://android.googlesource.com/platform/ndk/+/ndk-rXX-release/docs/BuildSystemMaintainers.md
25 # where XX is the NDK version. Do a diff against the version you're upgrading from, e.g.:
26 # https://android.googlesource.com/platform/ndk/+/ndk-r25-release..ndk-r26-release/docs/BuildSyst…
29 ndk=$ANDROID_HOME/ndk/$ndk_version
30 if ! [ -e $ndk ]; then
31 log "Installing NDK - this may take several minutes"
32 yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "ndk;$ndk_version"
35 if [ $HOST = "arm-linux-androideabi" ]; then
36 clang_triplet=armv7a-linux-androideabi
42 # $ndk/build/cmake/android.toolchain.cmake.
43 toolchain=$(echo $ndk/toolchains/llvm/prebuilt/*)
44 export AR="$toolchain/bin/llvm-ar"
45 export AS="$toolchain/bin/llvm-as"
46 export CC="$toolchain/bin/${clang_triplet}${api_level}-clang"
49 export NM="$toolchain/bin/llvm-nm"
50 export RANLIB="$toolchain/bin/llvm-ranlib"
51 export READELF="$toolchain/bin/llvm-readelf"
52 export STRIP="$toolchain/bin/llvm-strip"
55 for path in "$AR" "$AS" "$CC" "$CXX" "$LD" "$NM" "$RANLIB" "$READELF" "$STRIP"; do
56 if ! [ -e "$path" ]; then
57 fail "$path does not exist"
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"
65 # relocations in subsequently-loaded libraries, even if RTLD_GLOBAL is used
66 # (https://github.com/android/ndk/issues/1244). So any library that fails to
68 LDFLAGS="$LDFLAGS -Wl,--no-undefined"
70 # Many packages get away with omitting -lm on Linux, but Android is stricter.
71 LDFLAGS="$LDFLAGS -lm"
73 # -mstackrealign is included where necessary in the clang launcher scripts which are
75 if [ $HOST = "arm-linux-androideabi" ]; then
76 CFLAGS="$CFLAGS -march=armv7-a -mthumb"
79 if [ -n "${PREFIX:-}" ]; then
81 CFLAGS="$CFLAGS -I$abs_prefix/include"
82 LDFLAGS="$LDFLAGS -L$abs_prefix/lib"
84 export PKG_CONFIG="pkg-config --define-prefix"
92 # Use the same variable name as conda-build
94 export CPU_COUNT=$(sysctl -n hw.ncpu)