android: build: allow configuring build threads (#313)

clear committed Mar 31, 2022 at 13:58 UTC 3046581a9100820486c4062a1d8e3a51e4a1c4bf
8 files changed +8 -7
scripts/android/build_haven.sh
+1 -1
@@ -62,7 +62,7 @@ mkdir -p ./build/release
62 cd ./build/release
63 CC=${CLANG} CXX=${CXXLANG} cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH=${ARCH} -D STATIC=ON -D BUILD_64=${BUILD_64} -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG=${TAG} -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI=${ARCH_ABI} $FLAGS ../..
64
65 -make wallet_api -j4
65 +make wallet_api -j$THREADS
66 find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
67
68 cp -r ./lib/* $DEST_LIB_DIR
scripts/android/build_iconv.sh
+1 -1
@@ -31,7 +31,7 @@ rm -rf $ICONV_SRC_DIR
31 tar -xzf $ICONV_FILE_PATH -C $WORKDIR
32 cd $ICONV_SRC_DIR
33 CC=${CLANG} CXX=${CXXLANG} ./configure --build=x86_64-linux-gnu --host=${HOST} --prefix=${PREFIX} --disable-rpath
34 -make
34 +make -j$THREADS
35 make install
36
37 done
scripts/android/build_monero.sh
+1 -1
@@ -61,7 +61,7 @@ mkdir -p ./build/release
61 cd ./build/release
62 CC=${CLANG} CXX=${CXXLANG} cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH=${ARCH} -D STATIC=ON -D BUILD_64=${BUILD_64} -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG=${TAG} -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI=${ARCH_ABI} $FLAGS ../..
63
64 -make wallet_api -j4
64 +make wallet_api -j$THREADS
65 find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
66
67 cp -r ./lib/* $DEST_LIB_DIR
scripts/android/build_openssl.sh
+1 -1
@@ -49,7 +49,7 @@ CC=clang ANDROID_NDK=$TOOLCHAIN \
49 --prefix=${PREFIX} \
50 --openssldir=${PREFIX} \
51 -D__ANDROID_API__=$API
52 -make -j4
52 +make -j$THREADS
53 make install
54
55 done
scripts/android/build_sodium.sh
+1 -1
@@ -23,7 +23,7 @@ git clone https://github.com/jedisct1/libsodium.git $SODIUM_SRC_DIR -b $SODIUM_B
23 cd $SODIUM_SRC_DIR
24 ./autogen.sh
25 CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${HOST} --enable-static --disable-shared
26 -make
26 +make -j$THREADS
27 make install
28
29 done
scripts/android/build_zmq.sh
+1 -1
@@ -26,7 +26,7 @@ cd $ZMQ_SRC_DIR
26 git checkout ${ZMQ_COMMIT_HASH}
27 ./autogen.sh
28 CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${HOST} --enable-static --disable-shared
29 -make
29 +make -j$THREADS
30 make install
31
32 done
scripts/android/config.sh
+1
@@ -8,3 +8,4 @@ export ANDROID_NDK_HOME=$ANDROID_NDK_ROOT
8 export TOOLCHAIN_DIR="${WORKDIR}/toolchain"
9 export TOOLCHAIN_BASE_DIR=$TOOLCHAIN_DIR
10 export ORIGINAL_PATH=$PATH
11 +export THREADS=4
scripts/android/finish_boost.sh
+1 -1
@@ -6,4 +6,4 @@ BOOST_SRC_DIR=$3
6
7 cd $BOOST_SRC_DIR
8
9 -./b2 --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-locale --build-dir=android --stagedir=android toolset=clang threading=multi threadapi=pthread target-os=android -sICONV_PATH=${PREFIX} install
9 +./b2 --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-locale --build-dir=android --stagedir=android toolset=clang threading=multi threadapi=pthread target-os=android -sICONV_PATH=${PREFIX} -j$THREADS install