Build sanity checks
[novacoin.git] / mingw64_deps / boost / build.sh
1 #!/bin/bash
2
3 CROSS=$1
4 ROOT=$(pwd)
5
6 if [[ ! "${CROSS}" =~ ^(aarch64|x86_64) ]]; then
7 echo "Platform ${CROSS} is not supported"
8 echo "Expected either aarch64 or x86_64."
9 exit 1
10 fi
11
12 if [[ ! $(which ${CROSS}-w64-mingw32-clang) ]]; then
13 echo "llvm-mingw is not installed, please download it from https://github.com/mstorsjo/llvm-mingw/releases"
14 exit 1
15 fi
16
17 # Create stage directory
18 mkdir ${ROOT}/${CROSS}-w64-mingw32
19
20 cd ${ROOT}/boost
21
22 # Create compiler settings
23 echo "using gcc : : ${CROSS}-w64-mingw32-g++ ;" > user-config-${CROSS}.jam
24
25 # Build boost
26 ./b2 --user-config=user-config-${CROSS}.jam --build-type=minimal --layout=system --with-chrono --with-filesystem --with-program_options --with-system --with-thread target-os=windows address-model=64 variant=release link=static threading=multi runtime-link=static stage --prefix=${ROOT}/${CROSS}-w64-mingw32 install
27
28 cd ${ROOT}
29
30 # Remove build directories
31 rm -rf ${ROOT}/boost/stage ${ROOT}/boost/bin.v2