forked from introlab/webrtc-native-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate_ninja_files.bash
executable file
·55 lines (46 loc) · 1.38 KB
/
generate_ninja_files.bash
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
#!/bin/bash
architecture=$1
sysroot=$2
echo "Architecture: $architecture"
echo "Sysroot: $sysroot"
extras=""
extra_flags=""
case "$architecture" in
i?86)
a=x86
extras=""
extra_flags="is_clang=false target_os=\"linux\""
;;
x86_64|amd64)
a=x64
extras=""
extra_flags="is_clang=false target_os=\"linux\""
;;
win64)
a=x64
extras=""
extra_flags="is_clang=false target_os=\"windows\""
;;
arm32|armhf|armv*)
a=arm
extras=" arm_float_abi=\"hard\""
extra_flags="is_clang=false use_sysroot=true sysroot=\"$sysroot\" target_os=\"linux\""
;;
arm64|aarch64)
a=arm64
extras=""
extra_flags="is_clang=false use_sysroot=true sysroot=\"$sysroot\" target_os=\"linux\""
;;
osx64)
a=x64
extras=""
extra_flags="is_clang=true"
;;
*)
echo>&2 "WARNING: Unknown target platform: $a, continuing anyway"
;;
esac
common_flags="is_component_build=false treat_warnings_as_errors=false fatal_linker_warnings=false use_gio=false use_rtti=true use_custom_libcxx=false use_custom_libcxx_for_host=false rtc_enable_protobuf=false rtc_include_tests=false rtc_use_h264=true proprietary_codecs=true ffmpeg_branding=\"Chrome\" target_cpu=\"$a\" $extras enable_iterator_debugging=false rtc_build_examples=false rtc_use_pipewire=false"
gn gen out/Debug --args="is_debug=true $common_flags $extra_flags"
gn gen out/Release --args="is_debug=false $common_flags $extra_flags"
gn args --list out/Debug