1
1
#! /bin/bash
2
2
set -e
3
3
# ################# SETUP BEGIN
4
+ THREAD_COUNT=$( sysctl hw.ncpu | awk ' {print $2}' )
4
5
HOST_ARC=$( uname -m )
5
6
XCODE_ROOT=$( xcode-select -print-path )
6
7
BOOST_VER=1.80.0
@@ -44,6 +45,7 @@ if [ ! -d $SCRIPT_DIR/Pods/icu4c-iosx/product ]; then
44
45
pushd $SCRIPT_DIR
45
46
pod repo update
46
47
pod install --verbose
48
+ pod update --verbose
47
49
popd
48
50
mkdir $SCRIPT_DIR /Pods/icu4c-iosx/product/lib
49
51
fi
@@ -79,7 +81,8 @@ patch tools/build/src/tools/features/instruction-set-feature.jam $SCRIPT_DIR/ins
79
81
# LIBS_TO_BUILD="--with-regex"
80
82
LIBS_TO_BUILD=" --with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-json --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-wave"
81
83
82
- B2_BUILD_OPTIONS=" release link=static runtime-link=shared define=BOOST_SPIRIT_THREADSAFE"
84
+ B2_BUILD_OPTIONS=" -j$THREAD_COUNT -sICU_PATH=\" $ICU_PATH \" address-model=64 release link=static runtime-link=shared define=BOOST_SPIRIT_THREADSAFE cxxflags=\" -std=c++20\" "
85
+
83
86
84
87
if true ; then
85
88
if [ -d bin.v2 ]; then
@@ -94,10 +97,10 @@ if true; then
94
97
if [[ -f tools/build/src/user-config.jam ]]; then
95
98
rm -f tools/build/src/user-config.jam
96
99
fi
97
- cp $ICU_PATH /frameworks/icudata.xcframework/macos-$HOST_ARC /libicudata.a $ICU_PATH /lib/
98
- cp $ICU_PATH /frameworks/icui18n.xcframework/macos-$HOST_ARC /libicui18n.a $ICU_PATH /lib/
99
- cp $ICU_PATH /frameworks/icuuc.xcframework/macos-$HOST_ARC /libicuuc.a $ICU_PATH /lib/
100
- ./b2 -j8 --stagedir=stage/macosx cxxflags= " -std=c++17 " -sICU_PATH= " $ICU_PATH " toolset=darwin address-model=64 architecture=$BOOST_ARC $B2_BUILD_OPTIONS $LIBS_TO_BUILD
100
+ cp $ICU_PATH /frameworks/icudata.xcframework/macos-* $HOST_ARC * /libicudata.a $ICU_PATH /lib/
101
+ cp $ICU_PATH /frameworks/icui18n.xcframework/macos-* $HOST_ARC * /libicui18n.a $ICU_PATH /lib/
102
+ cp $ICU_PATH /frameworks/icuuc.xcframework/macos-* $HOST_ARC * /libicuuc.a $ICU_PATH /lib/
103
+ ./b2 -j8 --stagedir=stage/macosx toolset=darwin architecture=$BOOST_ARC $B2_BUILD_OPTIONS $LIBS_TO_BUILD
101
104
rm -rf bin.v2
102
105
fi
103
106
116
119
cp $ICU_PATH /frameworks/icudata.xcframework/ios-* -maccatalyst/libicudata.a $ICU_PATH /lib/
117
120
cp $ICU_PATH /frameworks/icui18n.xcframework/ios-* -maccatalyst/libicui18n.a $ICU_PATH /lib/
118
121
cp $ICU_PATH /frameworks/icuuc.xcframework/ios-* -maccatalyst/libicuuc.a $ICU_PATH /lib/
119
- ./b2 -j8 -- stagedir=stage/catalyst-$1 cxxflags= " -std=c++17 " -sICU_PATH= " $ICU_PATH " abi=$4 toolset=darwin-catalyst address-model=64 architecture=$3 $B2_BUILD_OPTIONS $LIBS_TO_BUILD
122
+ ./b2 -- stagedir=stage/catalyst-$1 abi=$4 toolset=darwin-catalyst architecture=$3 $B2_BUILD_OPTIONS $LIBS_TO_BUILD
120
123
rm -rf bin.v2
121
124
}
122
125
142
145
cp $ICU_PATH /frameworks/icudata.xcframework/ios-arm64/libicudata.a $ICU_PATH /lib/
143
146
cp $ICU_PATH /frameworks/icui18n.xcframework/ios-arm64/libicui18n.a $ICU_PATH /lib/
144
147
cp $ICU_PATH /frameworks/icuuc.xcframework/ios-arm64/libicuuc.a $ICU_PATH /lib/
145
- ./b2 -j8 -- stagedir=stage/ios cxxflags= " -std=c++17 " -sICU_PATH= " $ICU_PATH " toolset=darwin-ios address-model=64 instruction-set=arm64 architecture=arm binary-format=mach-o abi=aapcs target-os=iphone define=_LITTLE_ENDIAN define=BOOST_TEST_NO_MAIN $B2_BUILD_OPTIONS $LIBS_TO_BUILD
148
+ ./b2 -- stagedir=stage/ios toolset=darwin-ios instruction-set=arm64 architecture=arm binary-format=mach-o abi=aapcs target-os=iphone define=_LITTLE_ENDIAN define=BOOST_TEST_NO_MAIN $B2_BUILD_OPTIONS $LIBS_TO_BUILD
146
149
rm -rf bin.v2
147
150
fi
148
151
160
163
cp $ICU_PATH /frameworks/icudata.xcframework/ios-* -simulator/libicudata.a $ICU_PATH /lib/
161
164
cp $ICU_PATH /frameworks/icui18n.xcframework/ios-* -simulator/libicui18n.a $ICU_PATH /lib/
162
165
cp $ICU_PATH /frameworks/icuuc.xcframework/ios-* -simulator/libicuuc.a $ICU_PATH /lib/
163
- ./b2 -j8 -- stagedir=stage/iossim-$1 cxxflags= " -std=c++17 " -sICU_PATH= " $ICU_PATH " toolset=darwin-iossim abi=$3 address-model=64 architecture=$2 target-os=iphone define=BOOST_TEST_NO_MAIN $B2_BUILD_OPTIONS $LIBS_TO_BUILD
166
+ ./b2 -- stagedir=stage/iossim-$1 toolset=darwin-iossim abi=$3 architecture=$2 target-os=iphone define=BOOST_TEST_NO_MAIN $B2_BUILD_OPTIONS $LIBS_TO_BUILD
164
167
rm -rf bin.v2
165
168
}
166
169
0 commit comments