forked from flutter-team-archive/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathninja_build.sh
More file actions
33 lines (28 loc) · 843 Bytes
/
Copy pathninja_build.sh
File metadata and controls
33 lines (28 loc) · 843 Bytes
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
#!/bin/bash
set -e
RED='\033[0;31m'
NOCOLOR='\033[0m'
OUTPUT_POSTFIX=""
if [[ $(uname -m) == "arm64" ]]; then
echo "Host: arm64"
GN_SIM_ARGS="--simulator-cpu=arm64"
GN_ARGS="--mac-cpu=arm64"
OUTPUT_POSTFIX="_arm64"
else
echo "Host: x64"
GN_SIM_ARGS=""
GN_ARGS=""
fi
if [[ "$1" == "clean" ]]; then
echo "Clean build ..."
rm -rf ./out/ios_release$OUTPUT_POSTFIX
rm -rf ./out/host_release$OUTPUT_POSTFIX
fi
if [[ "$1" == "clean" ]] || [[ ! -d ./out/ios_release$OUTPUT_POSTFIX ]]; then
clear; ./flutter/tools/gn --ios --no-goma --runtime-mode=release $GN_ARGS
fi
ninja -C out/ios_release$OUTPUT_POSTFIX -v
if [[ "$1" == "clean" ]] || [[ ! -d ./out/host_release$OUTPUT_POSTFIX ]]; then
clear; ./flutter/tools/gn --no-goma --no-lto --runtime-mode=release --no-prebuilt-dart-sdk $GN_ARGS
fi
ninja -C out/host_release$OUTPUT_POSTFIX