-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·64 lines (42 loc) · 1.74 KB
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
VERSION=$1
if [ $# == 0 ]; then
VERSION=74
fi
BOOST_ARCH=combined
if [ $VERSION -ge 86 ]; then
BOOST_ARCH="arm+x86"
fi
platform=`sh script/platform.sh`
echo "----------------------------------------------"
echo "building boost version: 1.$VERSION for $platform"
echo "----------------------------------------------"
mkdir lib
# Boost ------------------------------------------------------------------------------------------------------------------
cd external
BOOST_VERSION=1.$VERSION.0
BOOST=boost_1_"$VERSION"_0
BOOST_TAR=$BOOST.tar.gz
curl -L -O https://boostorg.jfrog.io/artifactory/main/release/$BOOST_VERSION/source/$BOOST_TAR
tar -zxf $BOOST_TAR
rm $BOOST_TAR
mv $BOOST boost
echo "/*" > boost/.gitignore
echo "/*" > ../lib/.gitignore
cd boost
./bootstrap.sh --with-libraries=chrono,timer,filesystem,system,date_time,program_options,context
if [ $platform == "macOS" ]; then
./b2 toolset=clang cflags=-mmacosx-version-min=10.8 mflags=-mmacosx-version-min=10.8 mmflags=-mmacosx-version-min=10.8 cxxflags="-stdlib=libc++ -mmacosx-version-min=10.8" linkflags="-stdlib=libc++ -mmacosx-version-min=10.8" variant=release --layout=versioned
./b2 architecture=$BOOST_ARCH toolset=clang cflags=-mmacosx-version-min=10.8 mflags=-mmacosx-version-min=10.8 mmflags=-mmacosx-version-min=10.8 cxxflags="-arch x86_64 -arch arm64 -stdlib=libc++ -mmacosx-version-min=10.8" linkflags="-stdlib=libc++ -mmacosx-version-min=10.8" variant=release
else
./b2
fi
mv stage/lib/libboost_*.a ../../lib
# back to external
cd ..
# put it side-by-side
mv boost ../..
# CityHash ----------------------------------------------------------------------------------------------------------------
cd cityhash
env CXXFLAGS="-arch x86_64 -arch arm64" ./configure
make