-
Notifications
You must be signed in to change notification settings - Fork 6
/
build-mac.sh
executable file
·50 lines (41 loc) · 1.16 KB
/
build-mac.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
#!/bin/bash
set -e
# Check if the number of arguments is 1
if [ $# -ne 1 ]; then
echo "Usage: $0 <architecture>"
exit 1
fi
# Get the value of the first argument
ARCH="$1"
# Check if the argument value is "arm64" or "x64"
if [ "${ARCH}" != "arm64" ] && [ "${ARCH}" != "x64" ]; then
echo "Architecture must be 'arm64' or 'x64'"
exit 1
fi
# If there is 1 argument and its value is "arm64" or "x64", continue with the rest of the script
echo "Valid architecture: ${ARCH}"
XCODE_DEVELOPER_PATH=$(xcode-select -p)
ARGS="target_cpu=\"${ARCH}\"
v8_target_cpu=\"${ARCH}\"
mac_deployment_target=\"10.13\"
mac_min_system_version=\"10.13\"
enable_dsyms=false
use_thin_lto=false
use_lld=false
clang_base_path=\"${XCODE_DEVELOPER_PATH}/Toolchains/XcodeDefault.xctoolchain/usr\"
clang_use_chrome_plugins=false
chrome_pgo_phase=0
is_component_build=false
v8_monolithic=true
use_custom_libcxx=false
is_debug=false
v8_use_external_startup_data=false
is_official_build=true
v8_enable_i18n_support=false
treat_warnings_as_errors=false
symbol_level=0
v8_enable_webassembly=true
use_cxx17=true
v8_enable_sandbox=false"
gn gen out/mac --args="${ARGS}"
ninja -C out/mac v8_monolith d8 -v