forked from tworaz/quicksilver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·153 lines (140 loc) · 3.3 KB
/
configure
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#!/bin/bash
_script=$(readlink -f $0)
_script_dir=$(dirname $_script)
_top_dir=$_script_dir/..
EXTRA_GYP_ARGS=""
SYSTEM_GYP_ARGS=""
OUT_DIR="out.qt.$(uname -m)"
function show_help() {
cat << EOF
usage: $1 [options] [extra gyp flags]
Options:
-a|--arm Configure the code for arm architecture
-b|--scratchbox Configure the build to run under scratchbox
-o|--outdir <dir> Specify build output dir (Default: out.qt.$(uname -m))
-r|--release Enable release specific optimizations
-s|--sailfish Configure qt_port to for SailfishOS
-t|--system-tools Use system tools (gcc, ld, as) to build the code
-h|--help Show this help message
EOF
exit 0
}
function configure_for_sailfish() {
EXTRA_GYP_ARGS="\
$EXTRA_GYP_ARGS \
-Dsailfish=1 \
-Dicu_use_data_file_flag=0 \
"
SYSTEM_GYP_ARGS="\
${SYSTEM_GYP_ARGS} \
-Duse_system_icu=1 \
-Duse_system_flac=1 \
-Duse_system_expat=1 \
-Duse_system_libjpeg=1 \
-Duse_system_libusb=1 \
-Duse_system_libxml=1 \
-Duse_system_libxslt=1 \
-Duse_system_libspeex=1 \
-Duse_system_libbzip=1 \
-Duse_system_libexif=1 \
-Duse_system_libevent=1 \
-Duse_system_fontconfig=1 \
"
}
function configure_for_armv7hl() {
EXTRA_GYP_ARGS="\
$EXTRA_GYP_ARGS \
-Darm_version=7 \
-Darm_thumb=1 \
-Darm_neon=1 \
-Darm_float_abi=hard \
"
}
function use_system_tools() {
EXTRA_GYP_ARGS="\
$EXTRA_GYP_ARGS \
-Dclang=0 \
-Dlinux_use_bundled_binutils=0 \
-Dlinux_use_bundled_gold=0 \
-Dlinux_use_gold_flags=0 \
"
}
function release_optimize() {
# TODO: Fix LTO build
EXTRA_GYP_ARGS="\
$EXTRA_GYP_ARGS \
-Drelease_optimize=s \
-Duse_lto=0 \
-Dremove_webcore_debug_symbols=1 \
-Dlinux_dump_symbols=1 \
-Drelease_unwind_tables=0 \
-Dtracing_like_official_build=1 \
"
}
function replace_gyp_files() {
if [ "${SYSTEM_GYP_ARGS}" != "" ]; then
$_top_dir/build/linux/unbundle/replace_gyp_files.py ${SYSTEM_GYP_ARGS} "$@"
fi
}
USER_GYP_ARGS=""
while [[ $# > 0 ]]; do
case $1 in
-a|--armv7hl)
configure_for_armv7hl
;;
-b|--scratchbox)
EXTRA_GYP_ARGS="$EXTRA_GYP_ARGS --no-parallel -Dsysroot="
;;
-h|--help)
show_help
;;
-r|--release)
release_optimize
;;
-s|--sailfish)
configure_for_sailfish
;;
-t|--system-tools)
use_system_tools
;;
-o|--outdir)
OUT_DIR="$2"
shift
;;
*)
USER_GYP_ARGS="${USER_GYP_ARGS} $1"
;;
esac
shift
done
trap "echo cleanup; replace_gyp_files --undo" ERR SIGINT SIGTERM SIGQUIT
replace_gyp_files
$_top_dir/build/gyp_chromium \
$_top_dir/content/content_shell_and_tests.gyp \
$_top_dir/qt_port/quicksilver/quicksilver.gyp \
-Goutput_dir=$_top_dir/${OUT_DIR} \
--generator-output=$_top_dir/${OUT_DIR} \
-Duse_ozone=1 \
-Dozone_auto_platforms=0 \
-Dremoting=0 \
-Duse_glib=1 \
-Duse_allocator=none \
-Duse_qt=1 \
-Duse_aura=0 \
-Duse_gconf=0 \
-Duse_gio=0 \
-Duse_gnome_keyring=0 \
-Duse_cups=0 \
-Duse_libpci=0 \
-Duse_kerberos=0 \
-Duse_openssl=1 \
-Duse_nss_certs=0 \
-Duse_openssl_certs=1 \
-Ddisable_fatal_linker_warnings=1 \
-Denable_plugins=0 \
-Ddisable_nacl=1 \
-Denable_extensions=0 \
${EXTRA_GYP_ARGS} \
${SYSTEM_GYP_ARGS} \
${USER_GYP_ARGS}
replace_gyp_files --undo