-
Notifications
You must be signed in to change notification settings - Fork 7
/
vivaldi_common.gypi
332 lines (319 loc) · 10.6 KB
/
vivaldi_common.gypi
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
# Copyright (c) 2016 Vivaldi Technologies AS. All rights reserved
{
'includes': [
'<(DEPTH)/../vivaldi_sources.gypi',
'<(DEPTH)/../vivaldi_product.gypi',
],
'variables': {
'variables':{
'vivaldi_use_compilecache%': 0,
# Turns off the disabling of unittests performed by testing/disable_unittests.cpp
'enable_disabled_unit_tests%': 0,
'enable_permanently_disabled_unit_tests%': 0,
},
# Hack to make sure the variable is available later in the file.
'vivaldi_use_compilecache%': '<(vivaldi_use_compilecache)',
'enable_disabled_unit_tests%': '<(enable_disabled_unit_tests)',
'enable_permanently_disabled_unit_tests%': '<(enable_permanently_disabled_unit_tests)',
'VIVALDI': '<(DEPTH)/..',
'branding': 'vivaldi',
'build_branch%': 'master',
# Using Chromium as branding in FFMpeg library
'ffmpeg_branding': 'Chromium',
'enable_widevine': 1,
'enable_prod_wallet_service': 0,
'remoting': 0,
'disable_nacl': '1',
'disable_pnacl': 1,
'disable_newlib': 1,
'test_isolation_mode': 'noop',
'grit_defines': ['-D', '_vivaldi',
'-E', 'CHROMIUM_BUILD=vivaldi',
'-E', 'VIVALDI_BUILD=vivaldi'],
'proprietary_codecs': 1,
# Extra resource pak locales for Vivaldi from GRD files
# When adding a new locale foo ALWAYS update
# chromium/chrome/tools/build/win/FILES.cfg: Add entry for 'locale/foo.pak'
'locales': [
],
# Locales about to be added, but not ready
'vivaldi_pending_locales': [
'be', 'eo', 'es-PE', 'eu', 'fy', 'gl', 'hy', 'io',
'is', 'jbo', 'ka', 'ku', 'mk', 'sc', 'sq', 'nn',
],
'conditions' : [
['os_posix==1 and OS!="mac" and OS!="ios"', {
# On some versions of Linux, e.g. Ubuntu 14 official builds cannot use debian sysroot
'disable_sysroot': 0,
'linux_dump_symbols': 0,
}],
['OS=="ios"', {
'ios_product_name': 'Vivaldi',
'conditions': [
['buildtype=="Official"', {
'ios_breakpad': 1,
}],
],
}],
['OS=="mac" or OS=="ios"', {
'mac_product_name': 'Vivaldi',
'variables': {
# Mac OS X SDK and deployment target support. The SDK identifies
# the version of the system headers that will be used, and
# corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
# macro. "Maximum allowed" refers to the operating system version
# whose APIs are available in the headers. The deployment target
# identifies the minimum system version that the built products are
# expected to function on. It corresponds to the
# MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
# macros are available, #include <AvailabilityMacros.h>. Additional
# documentation on these macros is available at
# http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
# Chrome normally builds with the Mac OS X 10.6 SDK and sets the
# deployment target to 10.6. Other projects, such as O3D, may
# override these defaults.
# Normally, mac_sdk_min is used to find an SDK that Xcode knows
# about that is at least the specified version. In official builds,
# the SDK must match mac_sdk_min exactly. If the SDK is installed
# someplace that Xcode doesn't know about, set mac_sdk_path to the
# path to the SDK; when set to a non-empty string, SDK detection
# based on mac_sdk_min will be bypassed entirely.
'conditions': [
['OS=="ios"', {
'mac_sdk_min%': '10.9',
}, { # else OS!="ios"
'mac_sdk_min%': '10.9',
}],
],
'mac_sdk_path%': '',
},
'mac_sdk_min': '<(mac_sdk_min)',
'mac_sdk_path': '<(mac_sdk_path)',
'conditions': [
['buildtype=="Official"', {
'mac_strip_release': 1,
'mac_sdk': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))',
# Enable uploading crash dumps.
'mac_breakpad_uploads': 0,
# Enable dumping symbols at build time for use by Mac Breakpad.
'mac_breakpad': 1,
# Enable Keystone auto-update support.
'mac_keystone': 0,
}],
],
}],
['OS=="win"', {
'conditions': [
['target_arch == "x64"', {
'platform_suffix': '.x64',
}, {
'platform_suffix': '',
}],
],
}],
['OS=="win" or OS=="mac"', {
'system_proprietary_codecs': 1,
}, {
'system_proprietary_codecs': 0,
}],
['OS=="win" or OS=="mac" or chromeos==1', {
'enable_rlz': 1,
}],
['OS=="mac" and vivaldi_use_compilecache', {
'chromium_mac_pch':0,
}],
['OS=="win" and vivaldi_use_compilecache', {
'fastbuild':1,
'chromium_win_pch':0,
'win_z7':0,
}],
['OS == "mac"', {
'ffmpeg_component': '<(component)',
}, {
'ffmpeg_component': 'shared_library',
}],
],
},
'conditions': [
['(OS=="linux" or OS=="mac") and vivaldi_use_compilecache', {
'make_global_settings': [
['CC_wrapper', '<!(which ccache)'],
['CXX_wrapper', '<!(which ccache)'],
['CC.host_wrapper', '<!(which ccache)'],
['CXX.host_wrapper', '<!(which ccache)'],
],
}],
['OS=="win" and vivaldi_use_compilecache', {
'make_global_settings': [
['CC_wrapper', '<(clcache_exe)'],
['CXX_wrapper', '<(clcache_exe)'],
['CC.host_wrapper', '<(clcache_exe)'],
['CXX.host_wrapper', '<(clcache_exe)'],
],
}],
],
'target_defaults': {
'includes': [
'<(DEPTH)/../vivaldi_disabled_targets.gypi',
],
'include_dirs': [
'<(VIVALDI)', # vivaldi root folder
],
'defines': ['VIVALDI_BUILD','CHROMIUM_BUILD',
'VIVALDI_RELEASE=<!(python <(VIVALDI)/scripts/get_preview.py "<(build_branch)")',
'WIDEVINE_CDM_VERSION_STRING="1.0.123.456"',
'OMIT_CHROME_FRAME',
],
'conditions': [
['buildtype=="Official"', {
'defines': [
'VIVALDI_PRODUCT_VERSION="<(official_product_kind_string)"'
],
'conditions': [
['OS=="mac"', {
'configurations': {
'Release_Base': {
'xcode_settings': {
'OTHER_CFLAGS': [
# The Google Chrome Framework dSYM generated by dsymutil has
# grown larger than 4GB, which dsymutil can't handle. Reduce
# the amount of debug symbols.
'-fno-standalone-debug', # See http://crbug.com/479841
]
},
},
},
}],
],
}],
['OS=="win" and vivaldi_use_compilecache',{
'defines': ['VIVALDI_WIN_COMPILE_CACHE'],
}],
],
'target_conditions' : [
['_target_build_file in vivaldi_disabled_gyp', {
'disabled': 1,
}],
['_target_qualified in vivaldi_disabled_qualified', {
'disabled': 1,
}],
['_target_name in vivaldi_disabled', {
'disabled': 1,
}],
['_target_name=="browser_tests" and _target_build_file=="<(DEPTH)/chrome/chrome.gyp"', {
'sources': [
'<@(vivaldi_browser_tests_sources)',
],
}],
['_target_name in ["chrome_main_dll", "chrome_child_dll", "test_support_common"]', {
'sources': [
'<@(vivaldi_main_delegate)',
],
}],
['_target_name == "chrome_initial" and OS != "win" and OS != "mac" and OS != "android"', {
'sources': [
'<@(vivaldi_main_delegate)',
],
}],
['_target_name == "test_support_common"', {
'sources': [
'<@(vivaldi_unit_test_suite)',
],
}],
['_target_name == "base" and _target_build_file=="<(DEPTH)/base/base.gyp"', {
'sources': [
'<@(vivaldi_base)',
],
}],
['_target_name in ["base_static", "base_static_win64", "base_i18n_nacl"]', {
'sources': [
'<@(vivaldi_base_static)',
],
}],
['_target_name == "browser"', {
'sources': [
'<@(vivaldi_browser_sources)',
],
}],
['_target_name == "browser_ui"', {
'sources': [
'<@(vivaldi_browser_ui)',
],
'conditions': [
['OS == "mac"', {
'sources': [
'<@(vivaldi_browser_ui_mac)',
],
}],
['OS != "mac"', {
'sources': [
'<@(vivaldi_browser_ui_views)',
],
}]
],
}],
['_target_name == "setup"', {
'sources': [
'<@(vivaldi_setup)',
],
}],
['_target_name == "gtest"', {
'sources': [
'<@(vivaldi_gtest_updater)',
],
'conditions': [
['enable_disabled_unit_tests == 1', {
'defines': [
# Turns off the disabling of unittests performed by testing/disable_unittests.cpp
'DONT_DISABLE_UNITTESTS',
],
}],
['enable_permanently_disabled_unit_tests == 1', {
'defines': [
# Turns off the permanent disabling of unittests performed by testing/disable_unittests.cpp
'DONT_PERMANENTLY_DISABLE_UNITTESTS',
],
}],
],
}],
['_target_name == "common_constants"', {
'sources': [
'<@(vivaldi_common_constants)',
],
}],
['_target_name in ["chrome_dll", "chrome_main_dll"]', {
'mac_bundle_resources': [
'<@(vivaldi_nibs)',
],
}],
['_target_name == "extensions_browser"', {
'sources': [
'<@(vivaldi_extensions_browser)',
],
}],
['_target_name == "extensions_renderer"', {
'sources': [
'<@(vivaldi_extensions_renderer)',
],
}],
['_target_name == "blink_web"', {
'sources': [
'<@(vivaldi_keycode_translation)',
],
}],
['_target_name == "content"', {
'sources': [
'<@(vivaldi_keycode_translation)',
],
}],
['OS=="mac" and _target_name == "chrome_initial"', {
'mac_bundle_resources!': [
'<@(vivaldi_remove_mac_resources_chrome_exe)',
],
'mac_bundle_resources': [
'<@(vivaldi_add_mac_resources_chrome_exe)',
],
}],
],
},
}