|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
2 # Use of this source code is governed by a BSD-style license that can be |
|
3 # found in the LICENSE file. |
|
4 |
|
5 # IMPORTANT: |
|
6 # Please don't directly include this file if you are building via gyp_chromium, |
|
7 # since gyp_chromium is automatically forcing its inclusion. |
|
8 { |
|
9 # Variables expected to be overriden on the GYP command line (-D) or by |
|
10 # ~/.gyp/include.gypi. |
|
11 'variables': { |
|
12 # Putting a variables dict inside another variables dict looks kind of |
|
13 # weird. This is done so that 'host_arch', 'chromeos', etc are defined as |
|
14 # variables within the outer variables dict here. This is necessary |
|
15 # to get these variables defined for the conditions within this variables |
|
16 # dict that operate on these variables. |
|
17 'variables': { |
|
18 'variables': { |
|
19 'variables': { |
|
20 'variables': { |
|
21 # Whether we're building a ChromeOS build. |
|
22 'chromeos%': 0, |
|
23 |
|
24 # Whether or not we are using the Aura windowing framework. |
|
25 'use_aura%': 0, |
|
26 |
|
27 # Whether or not we are building the Ash shell. |
|
28 'use_ash%': 0, |
|
29 }, |
|
30 # Copy conditionally-set variables out one scope. |
|
31 'chromeos%': '<(chromeos)', |
|
32 'use_aura%': '<(use_aura)', |
|
33 'use_ash%': '<(use_ash)', |
|
34 |
|
35 # Whether we are using Views Toolkit |
|
36 'toolkit_views%': 0, |
|
37 |
|
38 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803 |
|
39 'use_openssl%': 0, |
|
40 |
|
41 'use_ibus%': 0, |
|
42 |
|
43 # Disable viewport meta tag by default. |
|
44 'enable_viewport%': 0, |
|
45 |
|
46 # Enable HiDPI support. |
|
47 'enable_hidpi%': 0, |
|
48 |
|
49 # Enable touch optimized art assets and metrics. |
|
50 'enable_touch_ui%': 0, |
|
51 |
|
52 # Is this change part of the android upstream bringup? |
|
53 # Allows us to *temporarily* disable certain things for |
|
54 # staging. Only set to 1 in a GYP_DEFINES. |
|
55 'android_upstream_bringup%': 0, |
|
56 |
|
57 # Override buildtype to select the desired build flavor. |
|
58 # Dev - everyday build for development/testing |
|
59 # Official - release build (generally implies additional processing) |
|
60 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp |
|
61 # conversion is done), some of the things which are now controlled by |
|
62 # 'branding', such as symbol generation, will need to be refactored |
|
63 # based on 'buildtype' (i.e. we don't care about saving symbols for |
|
64 # non-Official # builds). |
|
65 'buildtype%': 'Dev', |
|
66 |
|
67 'conditions': [ |
|
68 # ChromeOS implies ash. |
|
69 ['chromeos==1', { |
|
70 'use_ash%': 1, |
|
71 'use_aura%': 1, |
|
72 }], |
|
73 |
|
74 # For now, Windows builds that |use_aura| should also imply using |
|
75 # ash. This rule should be removed for the future when Windows is |
|
76 # using the aura windows without the ash interface. |
|
77 ['use_aura==1 and OS=="win"', { |
|
78 'use_ash%': 1, |
|
79 }], |
|
80 ['use_ash==1', { |
|
81 'use_aura%': 1, |
|
82 }], |
|
83 |
|
84 # A flag for BSD platforms |
|
85 ['OS=="dragonfly" or OS=="freebsd" or OS=="netbsd" or \ |
|
86 OS=="openbsd"', { |
|
87 'os_bsd%': 1, |
|
88 }, { |
|
89 'os_bsd%': 0, |
|
90 }], |
|
91 ], |
|
92 }, |
|
93 # Copy conditionally-set variables out one scope. |
|
94 'chromeos%': '<(chromeos)', |
|
95 'use_aura%': '<(use_aura)', |
|
96 'use_ash%': '<(use_ash)', |
|
97 'os_bsd%': '<(os_bsd)', |
|
98 'use_openssl%': '<(use_openssl)', |
|
99 'use_ibus%': '<(use_ibus)', |
|
100 'enable_viewport%': '<(enable_viewport)', |
|
101 'enable_hidpi%': '<(enable_hidpi)', |
|
102 'enable_touch_ui%': '<(enable_touch_ui)', |
|
103 'android_upstream_bringup%': '<(android_upstream_bringup)', |
|
104 'buildtype%': '<(buildtype)', |
|
105 |
|
106 # Sets whether we're building with the Android SDK/NDK (and hence with |
|
107 # Ant, value 0), or as part of the Android system (and hence with the |
|
108 # Android build system, value 1). |
|
109 'android_build_type%': 0, |
|
110 |
|
111 # Compute the architecture that we're building on. |
|
112 'conditions': [ |
|
113 ['OS=="win" or OS=="ios"', { |
|
114 'host_arch%': 'ia32', |
|
115 }, { |
|
116 # This handles the Unix platforms for which there is some support. |
|
117 # Anything else gets passed through, which probably won't work very |
|
118 # well; such hosts should pass an explicit target_arch to gyp. |
|
119 'host_arch%': |
|
120 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")', |
|
121 }], |
|
122 |
|
123 # Set default value of toolkit_views based on OS. |
|
124 ['OS=="win" or chromeos==1 or use_aura==1', { |
|
125 'toolkit_views%': 1, |
|
126 }, { |
|
127 'toolkit_views%': 0, |
|
128 }], |
|
129 |
|
130 # Set toolkit_uses_gtk for the Chromium browser on Linux. |
|
131 ['(OS=="linux" or OS=="solaris" or os_bsd==1) and use_aura==0', { |
|
132 'toolkit_uses_gtk%': 1, |
|
133 }, { |
|
134 'toolkit_uses_gtk%': 0, |
|
135 }], |
|
136 |
|
137 # Enable HiDPI on Mac OS and Chrome OS. |
|
138 ['OS=="mac" or chromeos==1', { |
|
139 'enable_hidpi%': 1, |
|
140 }], |
|
141 |
|
142 # Enable touch UI on Metro. |
|
143 ['OS=="win"', { |
|
144 'enable_touch_ui%': 1, |
|
145 }], |
|
146 ], |
|
147 }, |
|
148 |
|
149 # Copy conditionally-set variables out one scope. |
|
150 'chromeos%': '<(chromeos)', |
|
151 'host_arch%': '<(host_arch)', |
|
152 'toolkit_views%': '<(toolkit_views)', |
|
153 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', |
|
154 'use_aura%': '<(use_aura)', |
|
155 'use_ash%': '<(use_ash)', |
|
156 'os_bsd%': '<(os_bsd)', |
|
157 'use_openssl%': '<(use_openssl)', |
|
158 'use_ibus%': '<(use_ibus)', |
|
159 'enable_viewport%': '<(enable_viewport)', |
|
160 'enable_hidpi%': '<(enable_hidpi)', |
|
161 'enable_touch_ui%': '<(enable_touch_ui)', |
|
162 'android_upstream_bringup%': '<(android_upstream_bringup)', |
|
163 'android_build_type%': '<(android_build_type)', |
|
164 |
|
165 # We used to provide a variable for changing how libraries were built. |
|
166 # This variable remains until we can clean up all the users. |
|
167 # This needs to be one nested variables dict in so that dependent |
|
168 # gyp files can make use of it in their outer variables. (Yikes!) |
|
169 # http://code.google.com/p/chromium/issues/detail?id=83308 |
|
170 'library%': 'static_library', |
|
171 |
|
172 # Override branding to select the desired branding flavor. |
|
173 'branding%': 'Chromium', |
|
174 |
|
175 'buildtype%': '<(buildtype)', |
|
176 |
|
177 # Default architecture we're building for is the architecture we're |
|
178 # building on. |
|
179 'target_arch%': '<(host_arch)', |
|
180 |
|
181 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are |
|
182 # are built under a chromium full build (1) or a webkit.org chromium |
|
183 # build (0). |
|
184 'inside_chromium_build%': 1, |
|
185 |
|
186 # Set to 1 to enable fast builds. It disables debug info for fastest |
|
187 # compilation. |
|
188 'fastbuild%': 0, |
|
189 |
|
190 # Set to 1 to enable dcheck in release without having to use the flag. |
|
191 'dcheck_always_on%': 0, |
|
192 |
|
193 # Disable file manager component extension by default. |
|
194 'file_manager_extension%': 0, |
|
195 |
|
196 # Python version. |
|
197 'python_ver%': '2.6', |
|
198 |
|
199 # Set ARM version (for libyuv) |
|
200 'arm_version%': 6, |
|
201 |
|
202 # Set ARM-v7 compilation flags |
|
203 'armv7%': 0, |
|
204 |
|
205 # Set Neon compilation flags (only meaningful if armv7==1). |
|
206 'arm_neon%': 1, |
|
207 'arm_neon_optional%': 0, |
|
208 |
|
209 # The system root for cross-compiles. Default: none. |
|
210 'sysroot%': '', |
|
211 |
|
212 # The system libdir used for this ABI. |
|
213 'system_libdir%': 'lib', |
|
214 |
|
215 # On Linux, we build with sse2 for Chromium builds. |
|
216 'disable_sse2%': 0, |
|
217 |
|
218 # Use libjpeg-turbo as the JPEG codec used by Chromium. |
|
219 'use_libjpeg_turbo%': 1, |
|
220 |
|
221 # Use system libjpeg. Note that the system's libjepg will be used even if |
|
222 # use_libjpeg_turbo is set. |
|
223 'use_system_libjpeg%': 0, |
|
224 |
|
225 # Use system libvpx |
|
226 'use_system_libvpx%': 0, |
|
227 |
|
228 # Variable 'component' is for cases where we would like to build some |
|
229 # components as dynamic shared libraries but still need variable |
|
230 # 'library' for static libraries. |
|
231 # By default, component is set to whatever library is set to and |
|
232 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi. |
|
233 'component%': 'static_library', |
|
234 |
|
235 # Set to select the Title Case versions of strings in GRD files. |
|
236 'use_titlecase_in_grd_files%': 0, |
|
237 |
|
238 # Use translations provided by volunteers at launchpad.net. This |
|
239 # currently only works on Linux. |
|
240 'use_third_party_translations%': 0, |
|
241 |
|
242 # Remoting compilation is enabled by default. Set to 0 to disable. |
|
243 'remoting%': 1, |
|
244 |
|
245 # Configuration policy is enabled by default. Set to 0 to disable. |
|
246 'configuration_policy%': 1, |
|
247 |
|
248 # Safe browsing is compiled in by default. Set to 0 to disable. |
|
249 'safe_browsing%': 1, |
|
250 |
|
251 # Speech input is compiled in by default. Set to 0 to disable. |
|
252 'input_speech%': 1, |
|
253 |
|
254 # Notifications are compiled in by default. Set to 0 to disable. |
|
255 'notifications%' : 1, |
|
256 |
|
257 # If this is set, the clang plugins used on the buildbot will be used. |
|
258 # Run tools/clang/scripts/update.sh to make sure they are compiled. |
|
259 # This causes 'clang_chrome_plugins_flags' to be set. |
|
260 # Has no effect if 'clang' is not set as well. |
|
261 'clang_use_chrome_plugins%': 1, |
|
262 |
|
263 # Enable building with ASAN (Clang's -faddress-sanitizer option). |
|
264 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1 |
|
265 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer |
|
266 'asan%': 0, |
|
267 |
|
268 # Enable building with TSAN (Clang's -fthread-sanitizer option). |
|
269 # -fthread-sanitizer only works with clang, but tsan=1 implies clang=1 |
|
270 # See http://clang.llvm.org/docs/ThreadSanitizer.html |
|
271 'tsan%': 0, |
|
272 |
|
273 # Use a modified version of Clang to intercept allocated types and sizes |
|
274 # for allocated objects. clang_type_profiler=1 implies clang=1. |
|
275 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier |
|
276 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11 |
|
277 'clang_type_profiler%': 0, |
|
278 |
|
279 # Set to true to instrument the code with function call logger. |
|
280 # See src/third_party/cygprofile/cyg-profile.cc for details. |
|
281 'order_profiling%': 0, |
|
282 |
|
283 # Use the provided profiled order file to link Chrome image with it. |
|
284 # This makes Chrome faster by better using CPU cache when executing code. |
|
285 # This is known as PGO (profile guided optimization). |
|
286 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort |
|
287 'order_text_section%' : "", |
|
288 |
|
289 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared |
|
290 # libraries on linux x86-64 and arm, plus ASLR. |
|
291 'linux_fpic%': 1, |
|
292 |
|
293 # Whether one-click signin is enabled or not. |
|
294 'enable_one_click_signin%': 0, |
|
295 |
|
296 # Enable Web Intents support in WebKit. |
|
297 'enable_web_intents%': 1, |
|
298 |
|
299 # Enable Chrome browser extensions |
|
300 'enable_extensions%': 1, |
|
301 |
|
302 # Enable browser automation. |
|
303 'enable_automation%': 1, |
|
304 |
|
305 # Enable printing support and UI. |
|
306 'enable_printing%': 1, |
|
307 |
|
308 # Enable Web Intents web content registration via HTML element |
|
309 # and WebUI managing such registrations. |
|
310 'enable_web_intents_tag%': 0, |
|
311 |
|
312 # Webrtc compilation is enabled by default. Set to 0 to disable. |
|
313 'enable_webrtc%': 1, |
|
314 |
|
315 # PPAPI by default does not support plugins making calls off the main |
|
316 # thread. Set to 1 to turn on experimental support for out-of-process |
|
317 # plugins to make call of the main thread. |
|
318 'enable_pepper_threading%': 0, |
|
319 |
|
320 # Enables use of the session service, which is enabled by default. |
|
321 # Support for disabling depends on the platform. |
|
322 'enable_session_service%': 1, |
|
323 |
|
324 # Enables theme support, which is enabled by default. Support for |
|
325 # disabling depends on the platform. |
|
326 'enable_themes%': 1, |
|
327 |
|
328 # Uses OEM-specific wallpaper resources on Chrome OS. |
|
329 'use_oem_wallpaper%': 0, |
|
330 |
|
331 # Enables support for background apps. |
|
332 'enable_background%': 1, |
|
333 |
|
334 # Enable the task manager by default. |
|
335 'enable_task_manager%': 1, |
|
336 |
|
337 # Enable FTP support by default. |
|
338 'disable_ftp_support%': 0, |
|
339 |
|
340 # XInput2 multitouch support is disabled by default (use_xi2_mt=0). |
|
341 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled, |
|
342 # the input value also defines the required XI2 minor minimum version. |
|
343 # For example, use_xi2_mt=2 means XI2.2 or above version is required. |
|
344 'use_xi2_mt%': 0, |
|
345 |
|
346 # Use of precompiled headers on Windows. |
|
347 # |
|
348 # This is on by default in VS 2010, but off by default for VS |
|
349 # 2008 because of complications that it can cause with our |
|
350 # trybots etc. |
|
351 # |
|
352 # This variable may be explicitly set to 1 (enabled) or 0 |
|
353 # (disabled) in ~/.gyp/include.gypi or via the GYP command line. |
|
354 # This setting will override the default. |
|
355 # |
|
356 # Note that a setting of 1 is probably suitable for most or all |
|
357 # Windows developers using VS 2008, since precompiled headers |
|
358 # provide a build speedup of 20-25%. There are a couple of |
|
359 # small workarounds you may need to use when using VS 2008 (but |
|
360 # not 2010), see |
|
361 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders |
|
362 # for details. |
|
363 'chromium_win_pch%': 0, |
|
364 |
|
365 # Set this to true when building with Clang. |
|
366 # See http://code.google.com/p/chromium/wiki/Clang for details. |
|
367 'clang%': 0, |
|
368 |
|
369 # Enable plug-in installation by default. |
|
370 'enable_plugin_installation%': 1, |
|
371 |
|
372 # Enable protector service by default. |
|
373 'enable_protector_service%': 1, |
|
374 |
|
375 # Specifies whether to use canvas_skia.cc in place of platform |
|
376 # specific implementations of gfx::Canvas. Affects text drawing in the |
|
377 # Chrome UI. |
|
378 # TODO(asvitkine): Enable this on all platforms and delete this flag. |
|
379 # http://crbug.com/105550 |
|
380 'use_canvas_skia%': 0, |
|
381 |
|
382 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work |
|
383 # with one of those tools. |
|
384 'build_for_tool%': '', |
|
385 |
|
386 # Whether tests targets should be run, archived or just have the |
|
387 # dependencies verified. All the tests targets have the '_run' suffix, |
|
388 # e.g. base_unittests_run runs the target base_unittests. The test target |
|
389 # always calls tools/swarm_client/isolate.py. See the script's --help for |
|
390 # more information and the valid --mode values. Meant to be overriden with |
|
391 # GYP_DEFINES. |
|
392 # TODO(maruel): Converted the default from 'check' to 'noop' so work can |
|
393 # be done while the builders are being reconfigured to check out test data |
|
394 # files. |
|
395 'test_isolation_mode%': 'noop', |
|
396 # It must not be '<(PRODUCT_DIR)' alone, the '/' is necessary otherwise |
|
397 # gyp will remove duplicate flags, causing isolate.py to be confused. |
|
398 'test_isolation_outdir%': '<(PRODUCT_DIR)/isolate', |
|
399 |
|
400 # Force rlz to use chrome's networking stack. |
|
401 'force_rlz_use_chrome_net%': 1, |
|
402 |
|
403 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86', |
|
404 'wix_path%': '<(DEPTH)/third_party/wix', |
|
405 |
|
406 'conditions': [ |
|
407 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of |
|
408 # the 'conditions' clause. Initial attempts resulted in chromium and |
|
409 # webkit disagreeing on its setting. |
|
410 ['OS=="mac"', { |
|
411 'use_skia%': 1, |
|
412 }, { |
|
413 'use_skia%': 1, |
|
414 }], |
|
415 |
|
416 # A flag for POSIX platforms |
|
417 ['OS=="win"', { |
|
418 'os_posix%': 0, |
|
419 }, { |
|
420 'os_posix%': 1, |
|
421 }], |
|
422 |
|
423 # NSS usage. |
|
424 ['(OS=="linux" or OS=="solaris" or os_bsd==1) and use_openssl==0', { |
|
425 'use_nss%': 1, |
|
426 }, { |
|
427 'use_nss%': 0, |
|
428 }], |
|
429 |
|
430 # Flags to use X11 on non-Mac POSIX platforms |
|
431 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', { |
|
432 'use_glib%': 0, |
|
433 'use_x11%': 0, |
|
434 }, { |
|
435 'use_glib%': 1, |
|
436 'use_x11%': 1, |
|
437 }], |
|
438 |
|
439 # We always use skia text rendering in Aura on Windows, since GDI |
|
440 # doesn't agree with our BackingStore. |
|
441 # TODO(beng): remove once skia text rendering is on by default. |
|
442 ['use_aura==1 and OS=="win"', { |
|
443 'enable_skia_text%': 1, |
|
444 }], |
|
445 |
|
446 # A flag to enable or disable our compile-time dependency |
|
447 # on gnome-keyring. If that dependency is disabled, no gnome-keyring |
|
448 # support will be available. This option is useful |
|
449 # for Linux distributions and for Aura. |
|
450 ['chromeos==1 or use_aura==1', { |
|
451 'use_gnome_keyring%': 0, |
|
452 }, { |
|
453 'use_gnome_keyring%': 1, |
|
454 }], |
|
455 |
|
456 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', { |
|
457 # GTK+, Mac and iOS want Title Case strings |
|
458 'use_titlecase_in_grd_files%': 1, |
|
459 }], |
|
460 |
|
461 # Enable file manager extension on Chrome OS. |
|
462 ['chromeos==1', { |
|
463 'file_manager_extension%': 1, |
|
464 }, { |
|
465 'file_manager_extension%': 0, |
|
466 }], |
|
467 |
|
468 ['OS=="win" or OS=="mac" or (OS=="linux" and use_aura==0)', { |
|
469 'enable_one_click_signin%': 1, |
|
470 }], |
|
471 |
|
472 ['OS=="android"', { |
|
473 'enable_extensions%': 0, |
|
474 'enable_printing%': 0, |
|
475 'enable_themes%': 0, |
|
476 'enable_webrtc%': 0, |
|
477 'proprietary_codecs%': 1, |
|
478 'remoting%': 0, |
|
479 }], |
|
480 |
|
481 ['OS=="ios"', { |
|
482 'configuration_policy%': 0, |
|
483 'disable_ftp_support%': 1, |
|
484 'enable_automation%': 0, |
|
485 'enable_extensions%': 0, |
|
486 'enable_printing%': 0, |
|
487 'enable_themes%': 0, |
|
488 'enable_webrtc%': 0, |
|
489 'notifications%': 0, |
|
490 'remoting%': 0, |
|
491 }], |
|
492 |
|
493 # Use GPU accelerated cross process image transport by default |
|
494 # on linux builds with the Aura window manager |
|
495 ['use_aura==1 and OS=="linux"', { |
|
496 'ui_compositor_image_transport%': 1, |
|
497 }, { |
|
498 'ui_compositor_image_transport%': 0, |
|
499 }], |
|
500 |
|
501 # Turn precompiled headers on by default for VS 2010. |
|
502 ['OS=="win" and MSVS_VERSION=="2010" and buildtype!="Official"', { |
|
503 'chromium_win_pch%': 1 |
|
504 }], |
|
505 |
|
506 ['use_aura==1 or chromeos==1 or OS=="android"', { |
|
507 'enable_plugin_installation%': 0, |
|
508 }, { |
|
509 'enable_plugin_installation%': 1, |
|
510 }], |
|
511 |
|
512 ['OS=="android" or OS=="ios"', { |
|
513 'enable_protector_service%': 0, |
|
514 }, { |
|
515 'enable_protector_service%': 1, |
|
516 }], |
|
517 |
|
518 # linux_use_gold_binary: whether to use the binary checked into |
|
519 # third_party/gold. |
|
520 ['OS=="linux"', { |
|
521 'linux_use_gold_binary%': 1, |
|
522 }, { |
|
523 'linux_use_gold_binary%': 0, |
|
524 }], |
|
525 |
|
526 # linux_use_gold_flags: whether to use build flags that rely on gold. |
|
527 # On by default for x64 Linux. Temporarily off for ChromeOS as |
|
528 # it failed on a buildbot. |
|
529 ['OS=="linux" and chromeos==0', { |
|
530 'linux_use_gold_flags%': 1, |
|
531 }, { |
|
532 'linux_use_gold_flags%': 0, |
|
533 }], |
|
534 |
|
535 ['OS=="android"', { |
|
536 'enable_captive_portal_detection%': 0, |
|
537 }, { |
|
538 'enable_captive_portal_detection%': 1, |
|
539 }], |
|
540 |
|
541 # Enable Skia UI text drawing incrementally on different platforms. |
|
542 # http://crbug.com/105550 |
|
543 # |
|
544 # On Aura, this allows per-tile painting to be used in the browser |
|
545 # compositor. |
|
546 ['OS!="mac" and OS!="android"', { |
|
547 'use_canvas_skia%': 1, |
|
548 }], |
|
549 |
|
550 ['chromeos==1', { |
|
551 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo. |
|
552 'use_libjpeg_turbo%': 0, |
|
553 }], |
|
554 |
|
555 ['OS=="android"', { |
|
556 # When building as part of the Android system, use system libraries |
|
557 # where possible to reduce ROM size. |
|
558 'use_system_libjpeg%': '<(android_build_type)', |
|
559 }], |
|
560 ], |
|
561 |
|
562 # Set this to 1 to use the Google-internal file containing |
|
563 # official API keys for Google Chrome even in a developer build. |
|
564 # Setting this variable explicitly to 1 will cause your build to |
|
565 # fail if the internal file is missing. |
|
566 # |
|
567 # Set this to 0 to not use the internal file, even when it |
|
568 # exists in your checkout. |
|
569 # |
|
570 # Leave set to 2 to have this variable implicitly set to 1 if |
|
571 # you have src/google_apis/internal/google_chrome_api_keys.h in |
|
572 # your checkout, and implicitly set to 0 if not. |
|
573 # |
|
574 # Note that official builds always behave as if this variable |
|
575 # was explicitly set to 1, i.e. they always use official keys, |
|
576 # and will fail to build if the internal file is missing. |
|
577 'use_official_google_api_keys%': 2, |
|
578 |
|
579 # Set these to bake the specified API keys and OAuth client |
|
580 # IDs/secrets into your build. |
|
581 # |
|
582 # If you create a build without values baked in, you can instead |
|
583 # set environment variables to provide the keys at runtime (see |
|
584 # src/google_apis/google_api_keys.h for details). Features that |
|
585 # require server-side APIs may fail to work if no keys are |
|
586 # provided. |
|
587 # |
|
588 # Note that if you are building an official build or if |
|
589 # use_official_google_api_keys has been set to 1 (explicitly or |
|
590 # implicitly), these values will be ignored and the official |
|
591 # keys will be used instead. |
|
592 'google_api_key%': '', |
|
593 'google_default_client_id%': '', |
|
594 'google_default_client_secret%': '', |
|
595 }, |
|
596 |
|
597 # Copy conditionally-set variables out one scope. |
|
598 'branding%': '<(branding)', |
|
599 'buildtype%': '<(buildtype)', |
|
600 'target_arch%': '<(target_arch)', |
|
601 'host_arch%': '<(host_arch)', |
|
602 'library%': 'static_library', |
|
603 'toolkit_views%': '<(toolkit_views)', |
|
604 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)', |
|
605 'use_aura%': '<(use_aura)', |
|
606 'use_ash%': '<(use_ash)', |
|
607 'use_openssl%': '<(use_openssl)', |
|
608 'use_ibus%': '<(use_ibus)', |
|
609 'use_nss%': '<(use_nss)', |
|
610 'os_bsd%': '<(os_bsd)', |
|
611 'os_posix%': '<(os_posix)', |
|
612 'use_glib%': '<(use_glib)', |
|
613 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', |
|
614 'use_skia%': '<(use_skia)', |
|
615 'use_x11%': '<(use_x11)', |
|
616 'use_gnome_keyring%': '<(use_gnome_keyring)', |
|
617 'linux_fpic%': '<(linux_fpic)', |
|
618 'enable_pepper_threading%': '<(enable_pepper_threading)', |
|
619 'chromeos%': '<(chromeos)', |
|
620 'enable_viewport%': '<(enable_viewport)', |
|
621 'enable_hidpi%': '<(enable_hidpi)', |
|
622 'enable_touch_ui%': '<(enable_touch_ui)', |
|
623 'use_xi2_mt%':'<(use_xi2_mt)', |
|
624 'file_manager_extension%': '<(file_manager_extension)', |
|
625 'inside_chromium_build%': '<(inside_chromium_build)', |
|
626 'fastbuild%': '<(fastbuild)', |
|
627 'dcheck_always_on%': '<(dcheck_always_on)', |
|
628 'python_ver%': '<(python_ver)', |
|
629 'arm_version%': '<(arm_version)', |
|
630 'armv7%': '<(armv7)', |
|
631 'arm_neon%': '<(arm_neon)', |
|
632 'arm_neon_optional%': '<(arm_neon_optional)', |
|
633 'sysroot%': '<(sysroot)', |
|
634 'system_libdir%': '<(system_libdir)', |
|
635 'component%': '<(component)', |
|
636 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', |
|
637 'use_third_party_translations%': '<(use_third_party_translations)', |
|
638 'remoting%': '<(remoting)', |
|
639 'enable_one_click_signin%': '<(enable_one_click_signin)', |
|
640 'enable_webrtc%': '<(enable_webrtc)', |
|
641 'chromium_win_pch%': '<(chromium_win_pch)', |
|
642 'configuration_policy%': '<(configuration_policy)', |
|
643 'safe_browsing%': '<(safe_browsing)', |
|
644 'input_speech%': '<(input_speech)', |
|
645 'notifications%': '<(notifications)', |
|
646 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', |
|
647 'asan%': '<(asan)', |
|
648 'tsan%': '<(tsan)', |
|
649 'clang_type_profiler%': '<(clang_type_profiler)', |
|
650 'order_profiling%': '<(order_profiling)', |
|
651 'order_text_section%': '<(order_text_section)', |
|
652 'enable_extensions%': '<(enable_extensions)', |
|
653 'enable_web_intents%': '<(enable_web_intents)', |
|
654 'enable_web_intents_tag%': '<(enable_web_intents_tag)', |
|
655 'enable_plugin_installation%': '<(enable_plugin_installation)', |
|
656 'enable_protector_service%': '<(enable_protector_service)', |
|
657 'enable_session_service%': '<(enable_session_service)', |
|
658 'enable_themes%': '<(enable_themes)', |
|
659 'use_oem_wallpaper%': '<(use_oem_wallpaper)', |
|
660 'enable_background%': '<(enable_background)', |
|
661 'linux_use_gold_binary%': '<(linux_use_gold_binary)', |
|
662 'linux_use_gold_flags%': '<(linux_use_gold_flags)', |
|
663 'use_canvas_skia%': '<(use_canvas_skia)', |
|
664 'test_isolation_mode%': '<(test_isolation_mode)', |
|
665 'test_isolation_outdir%': '<(test_isolation_outdir)', |
|
666 'enable_automation%': '<(enable_automation)', |
|
667 'enable_printing%': '<(enable_printing)', |
|
668 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)', |
|
669 'disable_ftp_support%': '<(disable_ftp_support)', |
|
670 'force_rlz_use_chrome_net%': '<(force_rlz_use_chrome_net)', |
|
671 'enable_task_manager%': '<(enable_task_manager)', |
|
672 'sas_dll_path%': '<(sas_dll_path)', |
|
673 'wix_path%': '<(wix_path)', |
|
674 'android_upstream_bringup%': '<(android_upstream_bringup)', |
|
675 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)', |
|
676 'use_system_libjpeg%': '<(use_system_libjpeg)', |
|
677 'android_build_type%': '<(android_build_type)', |
|
678 'use_official_google_api_keys%': '<(use_official_google_api_keys)', |
|
679 'google_api_key%': '<(google_api_key)', |
|
680 'google_default_client_id%': '<(google_default_client_id)', |
|
681 'google_default_client_secret%': '<(google_default_client_secret)', |
|
682 |
|
683 # Use system yasm instead of bundled one. |
|
684 'use_system_yasm%': 0, |
|
685 |
|
686 # Default to enabled PIE; this is important for ASLR but we may need to be |
|
687 # able to turn it off for various reasons. |
|
688 'linux_disable_pie%': 0, |
|
689 |
|
690 # The release channel that this build targets. This is used to restrict |
|
691 # channel-specific build options, like which installer packages to create. |
|
692 # The default is 'all', which does no channel-specific filtering. |
|
693 'channel%': 'all', |
|
694 |
|
695 # Override chromium_mac_pch and set it to 0 to suppress the use of |
|
696 # precompiled headers on the Mac. Prefix header injection may still be |
|
697 # used, but prefix headers will not be precompiled. This is useful when |
|
698 # using distcc to distribute a build to compile slaves that don't |
|
699 # share the same compiler executable as the system driving the compilation, |
|
700 # because precompiled headers rely on pointers into a specific compiler |
|
701 # executable's image. Setting this to 0 is needed to use an experimental |
|
702 # Linux-Mac cross compiler distcc farm. |
|
703 'chromium_mac_pch%': 1, |
|
704 |
|
705 # The default value for mac_strip in target_defaults. This cannot be |
|
706 # set there, per the comment about variable% in a target_defaults. |
|
707 'mac_strip_release%': 1, |
|
708 |
|
709 # Set to 1 to enable code coverage. In addition to build changes |
|
710 # (e.g. extra CFLAGS), also creates a new target in the src/chrome |
|
711 # project file called "coverage". |
|
712 # Currently ignored on Windows. |
|
713 'coverage%': 0, |
|
714 |
|
715 # Set to 1 to force Visual C++ to use legacy debug information format /Z7. |
|
716 # This is useful for parallel compilation tools which can't support /Zi. |
|
717 # Only used on Windows. |
|
718 'win_z7%' : 0, |
|
719 |
|
720 # Although base/allocator lets you select a heap library via an |
|
721 # environment variable, the libcmt shim it uses sometimes gets in |
|
722 # the way. To disable it entirely, and switch to normal msvcrt, do e.g. |
|
723 # 'win_use_allocator_shim': 0, |
|
724 # 'win_release_RuntimeLibrary': 2 |
|
725 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. |
|
726 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt |
|
727 |
|
728 # Whether usage of OpenMAX is enabled. |
|
729 'enable_openmax%': 0, |
|
730 |
|
731 # Whether proprietary audio/video codecs are assumed to be included with |
|
732 # this build (only meaningful if branding!=Chrome). |
|
733 'proprietary_codecs%': 0, |
|
734 |
|
735 # TODO(bradnelson): eliminate this when possible. |
|
736 # To allow local gyp files to prevent release.vsprops from being included. |
|
737 # Yes(1) means include release.vsprops. |
|
738 # Once all vsprops settings are migrated into gyp, this can go away. |
|
739 'msvs_use_common_release%': 1, |
|
740 |
|
741 # TODO(bradnelson): eliminate this when possible. |
|
742 # To allow local gyp files to override additional linker options for msvs. |
|
743 # Yes(1) means set use the common linker options. |
|
744 'msvs_use_common_linker_extras%': 1, |
|
745 |
|
746 # TODO(sgk): eliminate this if possible. |
|
747 # It would be nicer to support this via a setting in 'target_defaults' |
|
748 # in chrome/app/locales/locales.gypi overriding the setting in the |
|
749 # 'Debug' configuration in the 'target_defaults' dict below, |
|
750 # but that doesn't work as we'd like. |
|
751 'msvs_debug_link_incremental%': '2', |
|
752 |
|
753 # Needed for some of the largest modules. |
|
754 'msvs_debug_link_nonincremental%': '1', |
|
755 |
|
756 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows |
|
757 # to get incremental linking to be faster in debug builds. |
|
758 'incremental_chrome_dll%': '0', |
|
759 |
|
760 # The default settings for third party code for treating |
|
761 # warnings-as-errors. Ideally, this would not be required, however there |
|
762 # is some third party code that takes a long time to fix/roll. So, this |
|
763 # flag allows us to have warnings as errors in general to prevent |
|
764 # regressions in most modules, while working on the bits that are |
|
765 # remaining. |
|
766 'win_third_party_warn_as_error%': 'true', |
|
767 |
|
768 # This is the location of the sandbox binary. Chrome looks for this before |
|
769 # running the zygote process. If found, and SUID, it will be used to |
|
770 # sandbox the zygote process and, thus, all renderer processes. |
|
771 'linux_sandbox_path%': '', |
|
772 |
|
773 # Set this to true to enable SELinux support. |
|
774 'selinux%': 0, |
|
775 |
|
776 # Clang stuff. |
|
777 'clang%': '<(clang)', |
|
778 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts', |
|
779 |
|
780 # These two variables can be set in GYP_DEFINES while running |
|
781 # |gclient runhooks| to let clang run a plugin in every compilation. |
|
782 # Only has an effect if 'clang=1' is in GYP_DEFINES as well. |
|
783 # Example: |
|
784 # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_add_plugin=print-fns' gclient runhooks |
|
785 |
|
786 'clang_load%': '', |
|
787 'clang_add_plugin%': '', |
|
788 |
|
789 # The default type of gtest. |
|
790 'gtest_target_type%': 'executable', |
|
791 |
|
792 # Enable sampling based profiler. |
|
793 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html |
|
794 'profiling%': '0', |
|
795 |
|
796 # Enable strict glibc debug mode. |
|
797 'glibcxx_debug%': 0, |
|
798 |
|
799 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot. |
|
800 'linux_breakpad%': 0, |
|
801 # And if we want to dump symbols for Breakpad-enabled builds. |
|
802 'linux_dump_symbols%': 0, |
|
803 # And if we want to strip the binary after dumping symbols. |
|
804 'linux_strip_binary%': 0, |
|
805 # Strip the test binaries needed for Linux reliability tests. |
|
806 'linux_strip_reliability_tests%': 0, |
|
807 |
|
808 # Enable TCMalloc. |
|
809 'linux_use_tcmalloc%': 1, |
|
810 |
|
811 # Disable TCMalloc's debugallocation. |
|
812 'linux_use_debugallocation%': 0, |
|
813 |
|
814 # Disable TCMalloc's heapchecker. |
|
815 'linux_use_heapchecker%': 0, |
|
816 |
|
817 # Disable shadow stack keeping used by heapcheck to unwind the stacks |
|
818 # better. |
|
819 'linux_keep_shadow_stacks%': 0, |
|
820 |
|
821 # Set to 1 to link against libgnome-keyring instead of using dlopen(). |
|
822 'linux_link_gnome_keyring%': 0, |
|
823 # Set to 1 to link against gsettings APIs instead of using dlopen(). |
|
824 'linux_link_gsettings%': 0, |
|
825 |
|
826 # Set Thumb compilation flags. |
|
827 'arm_thumb%': 0, |
|
828 |
|
829 # Set ARM fpu compilation flags (only meaningful if armv7==1 and |
|
830 # arm_neon==0). |
|
831 'arm_fpu%': 'vfpv3', |
|
832 |
|
833 # Set ARM float abi compilation flag. |
|
834 'arm_float_abi%': 'softfp', |
|
835 |
|
836 # Enable new NPDevice API. |
|
837 'enable_new_npdevice_api%': 0, |
|
838 |
|
839 # Enable EGLImage support in OpenMAX |
|
840 'enable_eglimage%': 1, |
|
841 |
|
842 # Enable a variable used elsewhere throughout the GYP files to determine |
|
843 # whether to compile in the sources for the GPU plugin / process. |
|
844 'enable_gpu%': 1, |
|
845 |
|
846 # .gyp files or targets should set chromium_code to 1 if they build |
|
847 # Chromium-specific code, as opposed to external code. This variable is |
|
848 # used to control such things as the set of warnings to enable, and |
|
849 # whether warnings are treated as errors. |
|
850 'chromium_code%': 0, |
|
851 |
|
852 'release_valgrind_build%': 0, |
|
853 |
|
854 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
|
855 'enable_wexit_time_destructors%': 0, |
|
856 |
|
857 # Set to 1 to compile with the built in pdf viewer. |
|
858 'internal_pdf%': 0, |
|
859 |
|
860 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests. |
|
861 'internal_gles2_conform_tests%': 0, |
|
862 |
|
863 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_' |
|
864 # so Cocoa is happy (http://crbug.com/20441). |
|
865 'locales': [ |
|
866 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', |
|
867 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he', |
|
868 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', |
|
869 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', |
|
870 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', |
|
871 'vi', 'zh-CN', 'zh-TW', |
|
872 ], |
|
873 |
|
874 # Pseudo locales are special locales which are used for testing and |
|
875 # debugging. They don't get copied to the final app. For more info, |
|
876 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi |
|
877 'pseudo_locales': [ |
|
878 'fake-bidi', |
|
879 ], |
|
880 |
|
881 'grit_defines': [], |
|
882 |
|
883 # If debug_devtools is set to 1, JavaScript files for DevTools are |
|
884 # stored as is and loaded from disk. Otherwise, a concatenated file |
|
885 # is stored in resources.pak. It is still possible to load JS files |
|
886 # from disk by passing --debug-devtools cmdline switch. |
|
887 'debug_devtools%': 0, |
|
888 |
|
889 # The Java Bridge is not compiled in by default. |
|
890 'java_bridge%': 0, |
|
891 |
|
892 # Code signing for iOS binaries. The bots need to be able to disable this. |
|
893 'chromium_ios_signing%': 1, |
|
894 |
|
895 # This flag is only used when disable_nacl==0 and disables all those |
|
896 # subcomponents which would require the installation of a native_client |
|
897 # untrusted toolchain. |
|
898 'disable_nacl_untrusted%': 0, |
|
899 |
|
900 # Disable Dart by default. |
|
901 'enable_dart%': 0, |
|
902 |
|
903 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi. |
|
904 'msbuild_toolset%': '', |
|
905 |
|
906 # Native Client is enabled by default. |
|
907 'disable_nacl%': 0, |
|
908 |
|
909 # Whether to build full debug version for Debug configuration on Android. |
|
910 # Compared to full debug version, the default Debug configuration on Android |
|
911 # has no full v8 debug, has size optimization and linker gc section, so that |
|
912 # we can build a debug version with acceptable size and performance. |
|
913 'android_full_debug%': 0, |
|
914 |
|
915 # Sets the default version name and code for Android app, by default we |
|
916 # do a developer build. |
|
917 'android_app_version_name%': 'Developer Build', |
|
918 'android_app_version_code%': 0, |
|
919 |
|
920 'sas_dll_exists': '<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(sas_dll_path))', |
|
921 'wix_exists': '<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(wix_path))', |
|
922 |
|
923 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files', |
|
924 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files', |
|
925 |
|
926 'conditions': [ |
|
927 ['"<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', { |
|
928 'windows_sdk_path%': '<(windows_sdk_default_path)', |
|
929 }, { |
|
930 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0', |
|
931 }], |
|
932 ['OS=="win" and "<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', { |
|
933 'directx_sdk_path%': '<(directx_sdk_default_path)', |
|
934 }, { |
|
935 'directx_sdk_path%': '$(DXSDK_DIR)', |
|
936 }], |
|
937 # If use_official_google_api_keys is already set (to 0 or 1), we |
|
938 # do none of the implicit checking. If it is set to 1 and the |
|
939 # internal keys file is missing, the build will fail at compile |
|
940 # time. If it is set to 0 and keys are not provided by other |
|
941 # means, a warning will be printed at compile time. |
|
942 ['use_official_google_api_keys==2', { |
|
943 'use_official_google_api_keys%': |
|
944 '<!(<(PYTHON) <(DEPTH)/google_apis/build/check_internal.py <(DEPTH)/google_apis/internal/google_chrome_api_keys.h)', |
|
945 }], |
|
946 ['os_posix==1 and OS!="mac" and OS!="ios"', { |
|
947 # Figure out the python architecture to decide if we build pyauto. |
|
948 # disabled for mozilla because windows != mac and this runs a shell script |
|
949 # 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)', |
|
950 'conditions': [ |
|
951 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so |
|
952 # that it takes effect here. |
|
953 # disabled for Mozilla since it doesn't use this, and 'msys' messes $(CXX) up |
|
954 ['build_with_mozilla==0 and clang==0 and asan==0 and tsan==0', { |
|
955 # This will set gcc_version to XY if you are running gcc X.Y.*. |
|
956 'gcc_version%': '<!(<(PYTHON) <(DEPTH)/build/compiler_version.py)', |
|
957 }, { |
|
958 'gcc_version%': 0, |
|
959 }], |
|
960 ['branding=="Chrome"', { |
|
961 'linux_breakpad%': 1, |
|
962 }], |
|
963 # All Chrome builds have breakpad symbols, but only process the |
|
964 # symbols from official builds. |
|
965 ['(branding=="Chrome" and buildtype=="Official")', { |
|
966 'linux_dump_symbols%': 1, |
|
967 }], |
|
968 ], |
|
969 }], # os_posix==1 and OS!="mac" and OS!="ios" |
|
970 ['OS=="ios"', { |
|
971 'disable_nacl%': 1, |
|
972 'enable_gpu%': 0, |
|
973 'icu_use_data_file_flag%': 1, |
|
974 'use_system_bzip2%': 1, |
|
975 'use_system_libxml%': 1, |
|
976 'use_system_sqlite%': 1, |
|
977 |
|
978 # The Mac SDK is set for iOS builds and passed through to Mac |
|
979 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be |
|
980 # overridden from the command line the same way it is for a Mac build. |
|
981 'mac_sdk%': '<!(<(PYTHON) <(DEPTH)/build/mac/find_sdk.py 10.6)', |
|
982 |
|
983 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually |
|
984 # what is required, but the value is left blank so when it is set in |
|
985 # the project files it will be the "current" iOS SDK. Forcing 5.0 |
|
986 # even though it is "current" causes Xcode to spit out a warning for |
|
987 # every single project file for not using the "current" SDK. |
|
988 'ios_sdk%': '', |
|
989 'ios_sdk_path%': '', |
|
990 'ios_deployment_target%': '4.3', |
|
991 |
|
992 'conditions': [ |
|
993 # ios_product_name is set to the name of the .app bundle as it should |
|
994 # appear on disk. |
|
995 ['branding=="Chrome"', { |
|
996 'ios_product_name%': 'Chrome', |
|
997 }, { # else: branding!="Chrome" |
|
998 'ios_product_name%': 'Chromium', |
|
999 }], |
|
1000 ['branding=="Chrome" and buildtype=="Official"', { |
|
1001 'ios_breakpad%': 1, |
|
1002 }, { # else: branding!="Chrome" or buildtype!="Official" |
|
1003 'ios_breakpad%': 0, |
|
1004 }], |
|
1005 ], |
|
1006 }], # OS=="ios" |
|
1007 ['OS=="android"', { |
|
1008 # Location of Android NDK. |
|
1009 'variables': { |
|
1010 'variables': { |
|
1011 'variables': { |
|
1012 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)', |
|
1013 }, |
|
1014 'android_ndk_root%': '<(android_ndk_root)', |
|
1015 'conditions': [ |
|
1016 ['target_arch == "ia32"', { |
|
1017 'android_app_abi%': 'x86', |
|
1018 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-x86', |
|
1019 }], |
|
1020 ['target_arch=="arm"', { |
|
1021 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-arm', |
|
1022 'conditions': [ |
|
1023 ['armv7==0', { |
|
1024 'android_app_abi%': 'armeabi', |
|
1025 }, { |
|
1026 'android_app_abi%': 'armeabi-v7a', |
|
1027 }], |
|
1028 ], |
|
1029 }], |
|
1030 ], |
|
1031 }, |
|
1032 'android_ndk_root%': '<(android_ndk_root)', |
|
1033 'android_app_abi%': '<(android_app_abi)', |
|
1034 'android_ndk_sysroot%': '<(android_ndk_sysroot)', |
|
1035 }, |
|
1036 'android_ndk_root%': '<(android_ndk_root)', |
|
1037 'android_ndk_sysroot': '<(android_ndk_sysroot)', |
|
1038 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', |
|
1039 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib', |
|
1040 'android_app_abi%': '<(android_app_abi)', |
|
1041 |
|
1042 # Location of the "strip" binary, used by both gyp and scripts. |
|
1043 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', |
|
1044 |
|
1045 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used |
|
1046 # to specify the output directory for Ant in the Android build. |
|
1047 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`', |
|
1048 |
|
1049 # Uses Android's crash report system |
|
1050 'linux_breakpad%': 0, |
|
1051 |
|
1052 # Always uses openssl. |
|
1053 'use_openssl%': 1, |
|
1054 |
|
1055 'proprietary_codecs%': '<(proprietary_codecs)', |
|
1056 'enable_task_manager%': 0, |
|
1057 'safe_browsing%': 0, |
|
1058 'configuration_policy%': 0, |
|
1059 'input_speech%': 0, |
|
1060 'enable_web_intents%': 0, |
|
1061 'enable_automation%': 0, |
|
1062 'java_bridge%': 1, |
|
1063 'build_ffmpegsumo%': 0, |
|
1064 'linux_use_tcmalloc%': 0, |
|
1065 |
|
1066 # Disable Native Client. |
|
1067 'disable_nacl%': 1, |
|
1068 |
|
1069 # Android does not support background apps. |
|
1070 'enable_background%': 0, |
|
1071 |
|
1072 # Sessions are store separately in the Java side. |
|
1073 'enable_session_service%': 0, |
|
1074 |
|
1075 # Set to 1 once we have a notification system for Android. |
|
1076 # http://crbug.com/115320 |
|
1077 'notifications%': 0, |
|
1078 |
|
1079 'p2p_apis%' : 0, |
|
1080 |
|
1081 # TODO(jrg): when 'gtest_target_type'=='shared_library' and |
|
1082 # OS==android, make all gtest_targets depend on |
|
1083 # testing/android/native_test.gyp:native_test_apk. |
|
1084 'gtest_target_type%': 'shared_library', |
|
1085 |
|
1086 # Uses system APIs for decoding audio and video. |
|
1087 'use_libffmpeg%': '0', |
|
1088 |
|
1089 # Always use the chromium skia. The use_system_harfbuzz needs to |
|
1090 # match use_system_skia. |
|
1091 'use_system_skia%': '0', |
|
1092 'use_system_harfbuzz%': '0', |
|
1093 |
|
1094 # Configure crash reporting and build options based on release type. |
|
1095 'conditions': [ |
|
1096 ['buildtype=="Official"', { |
|
1097 # Only report crash dumps for Official builds. |
|
1098 'linux_breakpad%': 1, |
|
1099 }, { |
|
1100 'linux_breakpad%': 0, |
|
1101 }], |
|
1102 ], |
|
1103 |
|
1104 # When building as part of the Android system, use system libraries |
|
1105 # where possible to reduce ROM size. |
|
1106 # TODO(steveblock): Investigate using the system version of sqlite. |
|
1107 'use_system_sqlite%': 0, # '<(android_build_type)', |
|
1108 'use_system_expat%': '<(android_build_type)', |
|
1109 'use_system_icu%': '<(android_build_type)', |
|
1110 'use_system_stlport%': '<(android_build_type)', |
|
1111 |
|
1112 # Copy it out one scope. |
|
1113 'android_build_type%': '<(android_build_type)', |
|
1114 }], # OS=="android" |
|
1115 ['OS=="mac"', { |
|
1116 'variables': { |
|
1117 # Mac OS X SDK and deployment target support. The SDK identifies |
|
1118 # the version of the system headers that will be used, and |
|
1119 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time |
|
1120 # macro. "Maximum allowed" refers to the operating system version |
|
1121 # whose APIs are available in the headers. The deployment target |
|
1122 # identifies the minimum system version that the built products are |
|
1123 # expected to function on. It corresponds to the |
|
1124 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these |
|
1125 # macros are available, #include <AvailabilityMacros.h>. Additional |
|
1126 # documentation on these macros is available at |
|
1127 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 |
|
1128 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the |
|
1129 # deployment target to 10.6. Other projects, such as O3D, may |
|
1130 # override these defaults. |
|
1131 |
|
1132 # Normally, mac_sdk_min is used to find an SDK that Xcode knows |
|
1133 # about that is at least the specified version. In official builds, |
|
1134 # the SDK must match mac_sdk_min exactly. If the SDK is installed |
|
1135 # someplace that Xcode doesn't know about, set mac_sdk_path to the |
|
1136 # path to the SDK; when set to a non-empty string, SDK detection |
|
1137 # based on mac_sdk_min will be bypassed entirely. |
|
1138 'mac_sdk_min%': '10.6', |
|
1139 'mac_sdk_path%': '', |
|
1140 |
|
1141 'mac_deployment_target%': '10.6', |
|
1142 }, |
|
1143 |
|
1144 'mac_sdk_min': '<(mac_sdk_min)', |
|
1145 'mac_sdk_path': '<(mac_sdk_path)', |
|
1146 'mac_deployment_target': '<(mac_deployment_target)', |
|
1147 |
|
1148 # Enable clang on mac by default! |
|
1149 'clang%': 1, |
|
1150 |
|
1151 # Compile in Breakpad support by default so that it can be |
|
1152 # tested, even if it is not enabled by default at runtime. |
|
1153 'mac_breakpad_compiled_in%': 1, |
|
1154 'conditions': [ |
|
1155 # mac_product_name is set to the name of the .app bundle as it should |
|
1156 # appear on disk. This duplicates data from |
|
1157 # chrome/app/theme/chromium/BRANDING and |
|
1158 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get |
|
1159 # these names into the build system. |
|
1160 ['branding=="Chrome"', { |
|
1161 'mac_product_name%': 'Google Chrome', |
|
1162 }, { # else: branding!="Chrome" |
|
1163 'mac_product_name%': 'Chromium', |
|
1164 }], |
|
1165 |
|
1166 ['branding=="Chrome" and buildtype=="Official"', { |
|
1167 'mac_sdk%': '<!(<(PYTHON) <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))', |
|
1168 # Enable uploading crash dumps. |
|
1169 'mac_breakpad_uploads%': 1, |
|
1170 # Enable dumping symbols at build time for use by Mac Breakpad. |
|
1171 'mac_breakpad%': 1, |
|
1172 # Enable Keystone auto-update support. |
|
1173 'mac_keystone%': 1, |
|
1174 }, { # else: branding!="Chrome" or buildtype!="Official" |
|
1175 'mac_sdk%': '<!(<(PYTHON) <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))', |
|
1176 'mac_breakpad_uploads%': 0, |
|
1177 'mac_breakpad%': 0, |
|
1178 'mac_keystone%': 0, |
|
1179 }], |
|
1180 ], |
|
1181 }], # OS=="mac" |
|
1182 |
|
1183 ['OS=="win"', { |
|
1184 'conditions': [ |
|
1185 ['component=="shared_library"', { |
|
1186 'win_use_allocator_shim%': 0, |
|
1187 }], |
|
1188 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', { |
|
1189 # Only enabled by default for ninja because it's buggy in VS. |
|
1190 # Not enabled for component=static_library because some targets |
|
1191 # are too large and the toolchain fails due to the size of the |
|
1192 # .obj files. |
|
1193 'incremental_chrome_dll%': 1, |
|
1194 }], |
|
1195 # Don't do incremental linking for large modules on 32-bit. |
|
1196 ['MSVS_OS_BITS==32', { |
|
1197 'msvs_large_module_debug_link_mode%': '1', # No |
|
1198 },{ |
|
1199 'msvs_large_module_debug_link_mode%': '2', # Yes |
|
1200 }], |
|
1201 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', { |
|
1202 'msvs_express%': 1, |
|
1203 'secure_atl%': 0, |
|
1204 },{ |
|
1205 'msvs_express%': 0, |
|
1206 'secure_atl%': 1, |
|
1207 }], |
|
1208 ], |
|
1209 'nacl_win64_defines': [ |
|
1210 # This flag is used to minimize dependencies when building |
|
1211 # Native Client loader for 64-bit Windows. |
|
1212 'NACL_WIN64', |
|
1213 ], |
|
1214 }], |
|
1215 |
|
1216 ['os_posix==1 and chromeos==0 and OS!="android"', { |
|
1217 'use_cups%': 1, |
|
1218 }, { |
|
1219 'use_cups%': 0, |
|
1220 }], |
|
1221 |
|
1222 # Native Client glibc toolchain is enabled by default except on arm. |
|
1223 ['target_arch=="arm"', { |
|
1224 'disable_glibc%': 1, |
|
1225 }, { |
|
1226 'disable_glibc%': 0, |
|
1227 }], |
|
1228 |
|
1229 # Disable SSE2 when building for ARM or MIPS. |
|
1230 ['target_arch=="arm" or target_arch=="mipsel"', { |
|
1231 'disable_sse2%': 1, |
|
1232 }, { |
|
1233 'disable_sse2%': '<(disable_sse2)', |
|
1234 }], |
|
1235 |
|
1236 # Set the relative path from this file to the GYP file of the JPEG |
|
1237 # library used by Chromium. |
|
1238 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', { |
|
1239 # Configuration for using the system libjeg is here. |
|
1240 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', |
|
1241 }, { |
|
1242 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', |
|
1243 }], |
|
1244 |
|
1245 # Options controlling the use of GConf (the classic GNOME configuration |
|
1246 # system) and GIO, which contains GSettings (the new GNOME config system). |
|
1247 ['chromeos==1', { |
|
1248 'use_gconf%': 0, |
|
1249 'use_gio%': 0, |
|
1250 }, { |
|
1251 'use_gconf%': 1, |
|
1252 'use_gio%': 1, |
|
1253 }], |
|
1254 |
|
1255 # Set up -D and -E flags passed into grit. |
|
1256 ['branding=="Chrome"', { |
|
1257 # TODO(mmoss) The .grd files look for _google_chrome, but for |
|
1258 # consistency they should look for google_chrome_build like C++. |
|
1259 'grit_defines': ['-D', '_google_chrome', |
|
1260 '-E', 'CHROMIUM_BUILD=google_chrome'], |
|
1261 }, { |
|
1262 'grit_defines': ['-D', '_chromium', |
|
1263 '-E', 'CHROMIUM_BUILD=chromium'], |
|
1264 }], |
|
1265 ['chromeos==1', { |
|
1266 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'], |
|
1267 }], |
|
1268 ['toolkit_views==1', { |
|
1269 'grit_defines': ['-D', 'toolkit_views'], |
|
1270 }], |
|
1271 ['use_aura==1', { |
|
1272 'grit_defines': ['-D', 'use_aura'], |
|
1273 }], |
|
1274 ['use_ash==1', { |
|
1275 'grit_defines': ['-D', 'use_ash'], |
|
1276 }], |
|
1277 ['use_nss==1', { |
|
1278 'grit_defines': ['-D', 'use_nss'], |
|
1279 }], |
|
1280 ['file_manager_extension==1', { |
|
1281 'grit_defines': ['-D', 'file_manager_extension'], |
|
1282 }], |
|
1283 ['remoting==1', { |
|
1284 'grit_defines': ['-D', 'remoting'], |
|
1285 }], |
|
1286 ['use_titlecase_in_grd_files==1', { |
|
1287 'grit_defines': ['-D', 'use_titlecase'], |
|
1288 }], |
|
1289 ['use_third_party_translations==1', { |
|
1290 'grit_defines': ['-D', 'use_third_party_translations'], |
|
1291 'locales': [ |
|
1292 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', |
|
1293 'ka', 'ku', 'kw', 'ms', 'ug' |
|
1294 ], |
|
1295 }], |
|
1296 ['OS=="android"', { |
|
1297 'grit_defines': ['-D', 'android'], |
|
1298 }], |
|
1299 ['OS=="mac"', { |
|
1300 'grit_defines': ['-D', 'scale_factors=2x'], |
|
1301 }], |
|
1302 ['OS == "ios"', { |
|
1303 'grit_defines': [ |
|
1304 # define for iOS specific resources. |
|
1305 '-D', 'ios', |
|
1306 # iOS uses a whitelist to filter resources. |
|
1307 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt' |
|
1308 ], |
|
1309 }], |
|
1310 ['enable_extensions==1', { |
|
1311 'grit_defines': ['-D', 'enable_extensions'], |
|
1312 }], |
|
1313 ['enable_printing==1', { |
|
1314 'grit_defines': ['-D', 'enable_printing'], |
|
1315 }], |
|
1316 ['enable_themes==1', { |
|
1317 'grit_defines': ['-D', 'enable_themes'], |
|
1318 }], |
|
1319 ['use_oem_wallpaper==1', { |
|
1320 'grit_defines': ['-D', 'use_oem_wallpaper'], |
|
1321 }], |
|
1322 ['clang_use_chrome_plugins==1 and OS!="win"', { |
|
1323 'clang_chrome_plugins_flags': [ |
|
1324 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' |
|
1325 ], |
|
1326 }], |
|
1327 |
|
1328 ['enable_web_intents_tag==1', { |
|
1329 'grit_defines': ['-D', 'enable_web_intents_tag'], |
|
1330 }], |
|
1331 |
|
1332 ['asan==1', { |
|
1333 'clang%': 1, |
|
1334 }], |
|
1335 ['asan==1 and OS=="mac"', { |
|
1336 # See http://crbug.com/145503. |
|
1337 'component': "static_library", |
|
1338 }], |
|
1339 ['tsan==1', { |
|
1340 'clang%': 1, |
|
1341 }], |
|
1342 |
|
1343 ['OS=="linux" and clang_type_profiler==1', { |
|
1344 'clang%': 1, |
|
1345 'clang_use_chrome_plugins%': 0, |
|
1346 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64', |
|
1347 }], |
|
1348 |
|
1349 # On valgrind bots, override the optimizer settings so we don't inline too |
|
1350 # much and make the stacks harder to figure out. |
|
1351 # |
|
1352 # TODO(rnk): Kill off variables that no one else uses and just implement |
|
1353 # them under a build_for_tool== condition. |
|
1354 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { |
|
1355 # gcc flags |
|
1356 'mac_debug_optimization': '1', |
|
1357 'mac_release_optimization': '1', |
|
1358 'release_optimize': '1', |
|
1359 'no_gc_sections': 1, |
|
1360 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
|
1361 '-fno-builtin -fno-optimize-sibling-calls', |
|
1362 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
|
1363 '-fno-builtin -fno-optimize-sibling-calls', |
|
1364 |
|
1365 # MSVS flags for TSan on Pin and Windows. |
|
1366 'win_debug_RuntimeChecks': '0', |
|
1367 'win_debug_disable_iterator_debugging': '1', |
|
1368 'win_debug_Optimization': '1', |
|
1369 'win_debug_InlineFunctionExpansion': '0', |
|
1370 'win_release_InlineFunctionExpansion': '0', |
|
1371 'win_release_OmitFramePointers': '0', |
|
1372 |
|
1373 'linux_use_tcmalloc': 1, |
|
1374 'release_valgrind_build': 1, |
|
1375 'werror': '', |
|
1376 'component': 'static_library', |
|
1377 'use_system_zlib': 0, |
|
1378 }], |
|
1379 |
|
1380 # Build tweaks for DrMemory. |
|
1381 # TODO(rnk): Combine with tsan config to share the builder. |
|
1382 # http://crbug.com/108155 |
|
1383 ['build_for_tool=="drmemory"', { |
|
1384 # These runtime checks force initialization of stack vars which blocks |
|
1385 # DrMemory's uninit detection. |
|
1386 'win_debug_RuntimeChecks': '0', |
|
1387 # Iterator debugging is slow. |
|
1388 'win_debug_disable_iterator_debugging': '1', |
|
1389 # Try to disable optimizations that mess up stacks in a release build. |
|
1390 'win_release_InlineFunctionExpansion': '0', |
|
1391 'win_release_OmitFramePointers': '0', |
|
1392 # Ditto for debug, to support bumping win_debug_Optimization. |
|
1393 'win_debug_InlineFunctionExpansion': 0, |
|
1394 'win_debug_OmitFramePointers': 0, |
|
1395 # Keep the code under #ifndef NVALGRIND. |
|
1396 'release_valgrind_build': 1, |
|
1397 }], |
|
1398 ], |
|
1399 |
|
1400 # List of default apps to install in new profiles. The first list contains |
|
1401 # the source files as found in svn. The second list, used only for linux, |
|
1402 # contains the destination location for each of the files. When a crx |
|
1403 # is added or removed from the list, the chrome/browser/resources/ |
|
1404 # default_apps/external_extensions.json file must also be updated. |
|
1405 'default_apps_list': [ |
|
1406 'browser/resources/default_apps/external_extensions.json', |
|
1407 'browser/resources/default_apps/gmail.crx', |
|
1408 'browser/resources/default_apps/search.crx', |
|
1409 'browser/resources/default_apps/youtube.crx', |
|
1410 'browser/resources/default_apps/drive.crx', |
|
1411 'browser/resources/default_apps/docs.crx', |
|
1412 ], |
|
1413 'default_apps_list_linux_dest': [ |
|
1414 '<(PRODUCT_DIR)/default_apps/external_extensions.json', |
|
1415 '<(PRODUCT_DIR)/default_apps/gmail.crx', |
|
1416 '<(PRODUCT_DIR)/default_apps/search.crx', |
|
1417 '<(PRODUCT_DIR)/default_apps/youtube.crx', |
|
1418 '<(PRODUCT_DIR)/default_apps/drive.crx', |
|
1419 '<(PRODUCT_DIR)/default_apps/docs.crx', |
|
1420 ], |
|
1421 }, |
|
1422 'target_defaults': { |
|
1423 'variables': { |
|
1424 # The condition that operates on chromium_code is in a target_conditions |
|
1425 # section, and will not have access to the default fallback value of |
|
1426 # chromium_code at the top of this file, or to the chromium_code |
|
1427 # variable placed at the root variables scope of .gyp files, because |
|
1428 # those variables are not set at target scope. As a workaround, |
|
1429 # if chromium_code is not set at target scope, define it in target scope |
|
1430 # to contain whatever value it has during early variable expansion. |
|
1431 # That's enough to make it available during target conditional |
|
1432 # processing. |
|
1433 'chromium_code%': '<(chromium_code)', |
|
1434 |
|
1435 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx |
|
1436 'win_release_Optimization%': '2', # 2 = /Os |
|
1437 'win_debug_Optimization%': '0', # 0 = /Od |
|
1438 |
|
1439 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx |
|
1440 # Tri-state: blank is default, 1 on, 0 off |
|
1441 'win_release_OmitFramePointers%': '0', |
|
1442 # Tri-state: blank is default, 1 on, 0 off |
|
1443 'win_debug_OmitFramePointers%': '', |
|
1444 |
|
1445 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx |
|
1446 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off |
|
1447 |
|
1448 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx |
|
1449 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, |
|
1450 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max |
|
1451 |
|
1452 # VS inserts quite a lot of extra checks to algorithms like |
|
1453 # std::partial_sort in Debug build which make them O(N^2) |
|
1454 # instead of O(N*logN). This is particularly slow under memory |
|
1455 # tools like ThreadSanitizer so we want it to be disablable. |
|
1456 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx |
|
1457 'win_debug_disable_iterator_debugging%': '0', |
|
1458 |
|
1459 'release_extra_cflags%': '', |
|
1460 'debug_extra_cflags%': '', |
|
1461 |
|
1462 'release_valgrind_build%': '<(release_valgrind_build)', |
|
1463 |
|
1464 # the non-qualified versions are widely assumed to be *nix-only |
|
1465 'win_release_extra_cflags%': '', |
|
1466 'win_debug_extra_cflags%': '', |
|
1467 |
|
1468 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
|
1469 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', |
|
1470 |
|
1471 # Only used by Windows build for now. Can be used to build into a |
|
1472 # differet output directory, e.g., a build_dir_prefix of VS2010_ would |
|
1473 # output files in src/build/VS2010_{Debug,Release}. |
|
1474 'build_dir_prefix%': '', |
|
1475 |
|
1476 # Targets are by default not nacl untrusted code. |
|
1477 'nacl_untrusted_build%': 0, |
|
1478 |
|
1479 'conditions': [ |
|
1480 ['OS=="win" and component=="shared_library"', { |
|
1481 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
|
1482 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) |
|
1483 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) |
|
1484 }, { |
|
1485 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
|
1486 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) |
|
1487 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) |
|
1488 }], |
|
1489 ['OS=="ios"', { |
|
1490 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
|
1491 'mac_release_optimization%': 's', # Use -Os unless overridden |
|
1492 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
|
1493 }, { |
|
1494 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
|
1495 'mac_release_optimization%': '3', # Use -O3 unless overridden |
|
1496 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
|
1497 }], |
|
1498 ], |
|
1499 }, |
|
1500 'conditions': [ |
|
1501 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', { |
|
1502 'cflags_cc!': ['-fno-rtti'], |
|
1503 'cflags_cc+': [ |
|
1504 '-frtti', |
|
1505 '-gline-tables-only', |
|
1506 '-fintercept-allocation-functions', |
|
1507 ], |
|
1508 'defines': ['TYPE_PROFILING'], |
|
1509 'dependencies': [ |
|
1510 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler', |
|
1511 ], |
|
1512 }], |
|
1513 ['OS=="win" and "<(msbuild_toolset)"!=""', { |
|
1514 'msbuild_toolset': '<(msbuild_toolset)', |
|
1515 }], |
|
1516 ['branding=="Chrome"', { |
|
1517 'defines': ['GOOGLE_CHROME_BUILD'], |
|
1518 }, { # else: branding!="Chrome" |
|
1519 'defines': ['CHROMIUM_BUILD'], |
|
1520 }], |
|
1521 ['OS=="mac" and component=="shared_library"', { |
|
1522 'xcode_settings': { |
|
1523 'DYLIB_INSTALL_NAME_BASE': '@rpath', |
|
1524 'LD_RUNPATH_SEARCH_PATHS': [ |
|
1525 # For unbundled binaries. |
|
1526 '@loader_path/.', |
|
1527 # For bundled binaries, to get back from Binary.app/Contents/MacOS. |
|
1528 '@loader_path/../../..', |
|
1529 ], |
|
1530 }, |
|
1531 }], |
|
1532 ['branding=="Chrome" and (OS=="win" or OS=="mac")', { |
|
1533 'defines': ['ENABLE_RLZ'], |
|
1534 }], |
|
1535 ['component=="shared_library"', { |
|
1536 'defines': ['COMPONENT_BUILD'], |
|
1537 }], |
|
1538 ['toolkit_views==1', { |
|
1539 'defines': ['TOOLKIT_VIEWS=1'], |
|
1540 }], |
|
1541 ['ui_compositor_image_transport==1', { |
|
1542 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'], |
|
1543 }], |
|
1544 ['use_aura==1', { |
|
1545 'defines': ['USE_AURA=1'], |
|
1546 }], |
|
1547 ['use_ash==1', { |
|
1548 'defines': ['USE_ASH=1'], |
|
1549 }], |
|
1550 ['use_libjpeg_turbo==1', { |
|
1551 'defines': ['USE_LIBJPEG_TURBO=1'], |
|
1552 }], |
|
1553 ['use_nss==1', { |
|
1554 'defines': ['USE_NSS=1'], |
|
1555 }], |
|
1556 ['enable_one_click_signin==1', { |
|
1557 'defines': ['ENABLE_ONE_CLICK_SIGNIN'], |
|
1558 }], |
|
1559 ['toolkit_uses_gtk==1 and toolkit_views==0', { |
|
1560 # TODO(erg): We are progressively sealing up use of deprecated features |
|
1561 # in gtk in preparation for an eventual porting to gtk3. |
|
1562 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'], |
|
1563 }], |
|
1564 ['chromeos==1', { |
|
1565 'defines': ['OS_CHROMEOS=1'], |
|
1566 }], |
|
1567 ['use_xi2_mt!=0', { |
|
1568 'defines': ['USE_XI2_MT=<(use_xi2_mt)'], |
|
1569 }], |
|
1570 ['file_manager_extension==1', { |
|
1571 'defines': ['FILE_MANAGER_EXTENSION=1'], |
|
1572 }], |
|
1573 ['profiling==1', { |
|
1574 'defines': ['ENABLE_PROFILING=1'], |
|
1575 }], |
|
1576 ['OS=="linux" and glibcxx_debug==1', { |
|
1577 'defines': ['_GLIBCXX_DEBUG=1',], |
|
1578 'cflags_cc!': ['-fno-rtti'], |
|
1579 'cflags_cc+': ['-frtti', '-g'], |
|
1580 }], |
|
1581 ['OS=="linux"', { |
|
1582 # we need lrint(), which is ISOC99, and Xcode |
|
1583 # already forces -std=c99 for mac below |
|
1584 'defines': ['_ISOC99_SOURCE=1'], |
|
1585 }], |
|
1586 ['remoting==1', { |
|
1587 'defines': ['ENABLE_REMOTING=1'], |
|
1588 }], |
|
1589 ['enable_webrtc==1', { |
|
1590 'defines': ['ENABLE_WEBRTC=1'], |
|
1591 }], |
|
1592 ['proprietary_codecs==1', { |
|
1593 'defines': ['USE_PROPRIETARY_CODECS'], |
|
1594 }], |
|
1595 ['enable_pepper_threading==1', { |
|
1596 'defines': ['ENABLE_PEPPER_THREADING'], |
|
1597 }], |
|
1598 ['enable_viewport==1', { |
|
1599 'defines': ['ENABLE_VIEWPORT'], |
|
1600 }], |
|
1601 ['configuration_policy==1', { |
|
1602 'defines': ['ENABLE_CONFIGURATION_POLICY'], |
|
1603 }], |
|
1604 ['input_speech==1', { |
|
1605 'defines': ['ENABLE_INPUT_SPEECH'], |
|
1606 }], |
|
1607 ['notifications==1', { |
|
1608 'defines': ['ENABLE_NOTIFICATIONS'], |
|
1609 }], |
|
1610 ['enable_hidpi==1', { |
|
1611 'defines': ['ENABLE_HIDPI=1'], |
|
1612 }], |
|
1613 ['fastbuild!=0', { |
|
1614 |
|
1615 'conditions': [ |
|
1616 # For Windows and Mac, we don't genererate debug information. |
|
1617 ['OS=="win" or OS=="mac"', { |
|
1618 'msvs_settings': { |
|
1619 'VCLinkerTool': { |
|
1620 'GenerateDebugInformation': 'false', |
|
1621 }, |
|
1622 'VCCLCompilerTool': { |
|
1623 'DebugInformationFormat': '0', |
|
1624 } |
|
1625 }, |
|
1626 'xcode_settings': { |
|
1627 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', |
|
1628 }, |
|
1629 }, { # else: OS != "win", generate less debug information. |
|
1630 'variables': { |
|
1631 'debug_extra_cflags': '-g1', |
|
1632 }, |
|
1633 }], |
|
1634 # Clang creates chubby debug information, which makes linking very |
|
1635 # slow. For now, don't create debug information with clang. See |
|
1636 # http://crbug.com/70000 |
|
1637 ['(OS=="linux" or OS=="android") and clang==1', { |
|
1638 'variables': { |
|
1639 'debug_extra_cflags': '-g0', |
|
1640 }, |
|
1641 }], |
|
1642 ], # conditions for fastbuild. |
|
1643 }], # fastbuild!=0 |
|
1644 ['dcheck_always_on!=0', { |
|
1645 'defines': ['DCHECK_ALWAYS_ON=1'], |
|
1646 }], # dcheck_always_on!=0 |
|
1647 ['selinux==1', { |
|
1648 'defines': ['CHROMIUM_SELINUX=1'], |
|
1649 }], |
|
1650 ['win_use_allocator_shim==0', { |
|
1651 'conditions': [ |
|
1652 ['OS=="win"', { |
|
1653 'defines': ['NO_TCMALLOC'], |
|
1654 }], |
|
1655 ], |
|
1656 }], |
|
1657 ['enable_gpu==1', { |
|
1658 'defines': [ |
|
1659 'ENABLE_GPU=1', |
|
1660 ], |
|
1661 }], |
|
1662 ['use_openssl==1', { |
|
1663 'defines': [ |
|
1664 'USE_OPENSSL=1', |
|
1665 ], |
|
1666 }], |
|
1667 ['enable_eglimage==1', { |
|
1668 'defines': [ |
|
1669 'ENABLE_EGLIMAGE=1', |
|
1670 ], |
|
1671 }], |
|
1672 ['use_skia==1', { |
|
1673 'defines': [ |
|
1674 'USE_SKIA=1', |
|
1675 ], |
|
1676 }], |
|
1677 ['coverage!=0', { |
|
1678 'conditions': [ |
|
1679 ['OS=="mac" or OS=="ios"', { |
|
1680 'xcode_settings': { |
|
1681 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs |
|
1682 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage |
|
1683 }, |
|
1684 }], |
|
1685 ['OS=="mac"', { |
|
1686 # Add -lgcov for types executable, shared_library, and |
|
1687 # loadable_module; not for static_library. |
|
1688 # This is a delayed conditional. |
|
1689 'target_conditions': [ |
|
1690 ['_type!="static_library"', { |
|
1691 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, |
|
1692 }], |
|
1693 ], |
|
1694 }], |
|
1695 ['OS=="linux" or OS=="android"', { |
|
1696 'cflags': [ '-ftest-coverage', |
|
1697 '-fprofile-arcs' ], |
|
1698 'link_settings': { 'libraries': [ '-lgcov' ] }, |
|
1699 }], |
|
1700 # Finally, for Windows, we simply turn on profiling. |
|
1701 ['OS=="win"', { |
|
1702 'msvs_settings': { |
|
1703 'VCLinkerTool': { |
|
1704 'Profile': 'true', |
|
1705 }, |
|
1706 'VCCLCompilerTool': { |
|
1707 # /Z7, not /Zi, so coverage is happyb |
|
1708 'DebugInformationFormat': '1', |
|
1709 'AdditionalOptions': ['/Yd'], |
|
1710 } |
|
1711 } |
|
1712 }], # OS==win |
|
1713 ], # conditions for coverage |
|
1714 }], # coverage!=0 |
|
1715 ['OS=="win"', { |
|
1716 'defines': [ |
|
1717 '__STD_C', |
|
1718 '_CRT_SECURE_NO_DEPRECATE', |
|
1719 '_SCL_SECURE_NO_DEPRECATE', |
|
1720 ], |
|
1721 'include_dirs': [ |
|
1722 '<(DEPTH)/third_party/wtl/include', |
|
1723 ], |
|
1724 'conditions': [ |
|
1725 ['win_z7!=0', { |
|
1726 'msvs_settings': { |
|
1727 # Generates debug info when win_z7=1 |
|
1728 # even if fastbuild=1 (that makes GenerateDebugInformation false). |
|
1729 'VCLinkerTool': { |
|
1730 'GenerateDebugInformation': 'true', |
|
1731 }, |
|
1732 'VCCLCompilerTool': { |
|
1733 'DebugInformationFormat': '1', |
|
1734 } |
|
1735 } |
|
1736 }], |
|
1737 ], # win_z7!=0 |
|
1738 }], # OS==win |
|
1739 ['enable_task_manager==1', { |
|
1740 'defines': [ |
|
1741 'ENABLE_TASK_MANAGER=1', |
|
1742 ], |
|
1743 }], |
|
1744 ['enable_web_intents==1', { |
|
1745 'defines': [ |
|
1746 'ENABLE_WEB_INTENTS=1', |
|
1747 ], |
|
1748 }], |
|
1749 ['enable_extensions==1', { |
|
1750 'defines': [ |
|
1751 'ENABLE_EXTENSIONS=1', |
|
1752 ], |
|
1753 }], |
|
1754 ['OS=="win" and branding=="Chrome"', { |
|
1755 'defines': ['ENABLE_SWIFTSHADER'], |
|
1756 }], |
|
1757 ['enable_dart==1', { |
|
1758 'defines': ['WEBKIT_USING_DART=1'], |
|
1759 }], |
|
1760 ['enable_plugin_installation==1', { |
|
1761 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'], |
|
1762 }], |
|
1763 ['enable_protector_service==1', { |
|
1764 'defines': ['ENABLE_PROTECTOR_SERVICE=1'], |
|
1765 }], |
|
1766 ['enable_session_service==1', { |
|
1767 'defines': ['ENABLE_SESSION_SERVICE=1'], |
|
1768 }], |
|
1769 ['enable_themes==1', { |
|
1770 'defines': ['ENABLE_THEMES=1'], |
|
1771 }], |
|
1772 ['enable_background==1', { |
|
1773 'defines': ['ENABLE_BACKGROUND=1'], |
|
1774 }], |
|
1775 ['enable_automation==1', { |
|
1776 'defines': ['ENABLE_AUTOMATION=1'], |
|
1777 }], |
|
1778 ['enable_printing==1', { |
|
1779 'defines': ['ENABLE_PRINTING=1'], |
|
1780 }], |
|
1781 ['enable_captive_portal_detection==1', { |
|
1782 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'], |
|
1783 }], |
|
1784 ['disable_ftp_support==1', { |
|
1785 'defines': ['DISABLE_FTP_SUPPORT=1'], |
|
1786 }], |
|
1787 ], # conditions for 'target_defaults' |
|
1788 'target_conditions': [ |
|
1789 ['enable_wexit_time_destructors==1', { |
|
1790 'conditions': [ |
|
1791 [ 'clang==1', { |
|
1792 'cflags': [ |
|
1793 '-Wexit-time-destructors', |
|
1794 ], |
|
1795 'xcode_settings': { |
|
1796 'WARNING_CFLAGS': [ |
|
1797 '-Wexit-time-destructors', |
|
1798 ], |
|
1799 }, |
|
1800 }], |
|
1801 ], |
|
1802 }], |
|
1803 ['chromium_code==0', { |
|
1804 'conditions': [ |
|
1805 [ 'os_posix==1 and OS!="mac" and OS!="ios"', { |
|
1806 # We don't want to get warnings from third-party code, |
|
1807 # so remove any existing warning-enabling flags like -Wall. |
|
1808 'cflags!': [ |
|
1809 '-Wall', |
|
1810 '-Wextra', |
|
1811 ], |
|
1812 'cflags_cc': [ |
|
1813 # Don't warn about hash_map in third-party code. |
|
1814 '-Wno-deprecated', |
|
1815 ], |
|
1816 'cflags': [ |
|
1817 # Don't warn about printf format problems. |
|
1818 # This is off by default in gcc but on in Ubuntu's gcc(!). |
|
1819 '-Wno-format', |
|
1820 ], |
|
1821 'cflags_cc!': [ |
|
1822 # TODO(fischman): remove this. |
|
1823 # http://code.google.com/p/chromium/issues/detail?id=90453 |
|
1824 '-Wsign-compare', |
|
1825 ] |
|
1826 }], |
|
1827 # TODO: Fix all warnings on chromeos too. |
|
1828 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', { |
|
1829 'cflags!': [ |
|
1830 '-Werror', |
|
1831 ], |
|
1832 }], |
|
1833 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', { |
|
1834 'cflags': [ |
|
1835 # Don't warn about ignoring the return value from e.g. close(). |
|
1836 # This is off by default in some gccs but on by default in others. |
|
1837 # BSD systems do not support this option, since they are usually |
|
1838 # using gcc 4.2.1, which does not have this flag yet. |
|
1839 '-Wno-unused-result', |
|
1840 ], |
|
1841 }], |
|
1842 [ 'OS=="win"', { |
|
1843 'defines': [ |
|
1844 '_CRT_SECURE_NO_DEPRECATE', |
|
1845 '_CRT_NONSTDC_NO_WARNINGS', |
|
1846 '_CRT_NONSTDC_NO_DEPRECATE', |
|
1847 '_SCL_SECURE_NO_DEPRECATE', |
|
1848 ], |
|
1849 'msvs_disabled_warnings': [4800], |
|
1850 'msvs_settings': { |
|
1851 'VCCLCompilerTool': { |
|
1852 'WarningLevel': '3', |
|
1853 'WarnAsError': '<(win_third_party_warn_as_error)', |
|
1854 'Detect64BitPortabilityProblems': 'false', |
|
1855 }, |
|
1856 }, |
|
1857 'conditions': [ |
|
1858 ['buildtype=="Official"', { |
|
1859 'msvs_settings': { |
|
1860 'VCCLCompilerTool': { 'WarnAsError': 'false' }, |
|
1861 } |
|
1862 }], |
|
1863 ], |
|
1864 }], |
|
1865 # TODO(darin): Unfortunately, some third_party code depends on base/ |
|
1866 [ 'OS=="win" and component=="shared_library"', { |
|
1867 'msvs_disabled_warnings': [ |
|
1868 4251, # class 'std::xx' needs to have dll-interface. |
|
1869 ], |
|
1870 }], |
|
1871 [ 'OS=="mac" or OS=="ios"', { |
|
1872 'xcode_settings': { |
|
1873 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], |
|
1874 }, |
|
1875 'conditions': [ |
|
1876 ['buildtype=="Official"', { |
|
1877 'xcode_settings': { |
|
1878 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror |
|
1879 }, |
|
1880 }], |
|
1881 ], |
|
1882 }], |
|
1883 [ 'OS=="ios"', { |
|
1884 'xcode_settings': { |
|
1885 # TODO(ios): Fix remaining warnings in third-party code, then |
|
1886 # remove this; the Mac cleanup didn't get everything that's |
|
1887 # flagged in an iOS build. |
|
1888 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', |
|
1889 'RUN_CLANG_STATIC_ANALYZER': 'NO', |
|
1890 }, |
|
1891 }], |
|
1892 ], |
|
1893 }, { |
|
1894 'includes': [ |
|
1895 # Rules for excluding e.g. foo_win.cc from the build on non-Windows. |
|
1896 'filename_rules.gypi', |
|
1897 ], |
|
1898 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the |
|
1899 # C99 macros on Mac and Linux. |
|
1900 'defines': [ |
|
1901 '__STDC_FORMAT_MACROS', |
|
1902 ], |
|
1903 'conditions': [ |
|
1904 ['OS=="win"', { |
|
1905 # turn on warnings for signed/unsigned mismatch on chromium code. |
|
1906 'msvs_settings': { |
|
1907 'VCCLCompilerTool': { |
|
1908 'AdditionalOptions': ['/we4389'], |
|
1909 }, |
|
1910 }, |
|
1911 }], |
|
1912 ['OS=="win" and component=="shared_library"', { |
|
1913 'msvs_disabled_warnings': [ |
|
1914 4251, # class 'std::xx' needs to have dll-interface. |
|
1915 ], |
|
1916 }], |
|
1917 ], |
|
1918 }], |
|
1919 ], # target_conditions for 'target_defaults' |
|
1920 'default_configuration': 'Debug', |
|
1921 'configurations': { |
|
1922 # VCLinkerTool LinkIncremental values below: |
|
1923 # 0 == default |
|
1924 # 1 == /INCREMENTAL:NO |
|
1925 # 2 == /INCREMENTAL |
|
1926 # Debug links incremental, Release does not. |
|
1927 # |
|
1928 # Abstract base configurations to cover common attributes. |
|
1929 # |
|
1930 'Common_Base': { |
|
1931 'abstract': 1, |
|
1932 'msvs_configuration_attributes': { |
|
1933 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)', |
|
1934 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
|
1935 'CharacterSet': '1', |
|
1936 }, |
|
1937 }, |
|
1938 'x86_Base': { |
|
1939 'abstract': 1, |
|
1940 'msvs_settings': { |
|
1941 'VCLinkerTool': { |
|
1942 'TargetMachine': '1', |
|
1943 }, |
|
1944 }, |
|
1945 'msvs_configuration_platform': 'Win32', |
|
1946 }, |
|
1947 'x64_Base': { |
|
1948 'abstract': 1, |
|
1949 'msvs_configuration_platform': 'x64', |
|
1950 'msvs_settings': { |
|
1951 'VCLinkerTool': { |
|
1952 'TargetMachine': '17', # x86 - 64 |
|
1953 'AdditionalLibraryDirectories!': |
|
1954 ['<(windows_sdk_path)/Lib/win8/um/x86'], |
|
1955 'AdditionalLibraryDirectories': |
|
1956 ['<(windows_sdk_path)/Lib/win8/um/x64'], |
|
1957 }, |
|
1958 'VCLibrarianTool': { |
|
1959 'AdditionalLibraryDirectories!': |
|
1960 ['<(windows_sdk_path)/Lib/win8/um/x86'], |
|
1961 'AdditionalLibraryDirectories': |
|
1962 ['<(windows_sdk_path)/Lib/win8/um/x64'], |
|
1963 }, |
|
1964 }, |
|
1965 'defines': [ |
|
1966 # Not sure if tcmalloc works on 64-bit Windows. |
|
1967 'NO_TCMALLOC', |
|
1968 ], |
|
1969 }, |
|
1970 'Debug_Base': { |
|
1971 'abstract': 1, |
|
1972 'defines': [ |
|
1973 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
|
1974 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
|
1975 ], |
|
1976 'xcode_settings': { |
|
1977 'COPY_PHASE_STRIP': 'NO', |
|
1978 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', |
|
1979 'OTHER_CFLAGS': [ |
|
1980 '<@(debug_extra_cflags)', |
|
1981 ], |
|
1982 }, |
|
1983 'msvs_settings': { |
|
1984 'VCCLCompilerTool': { |
|
1985 'Optimization': '<(win_debug_Optimization)', |
|
1986 'PreprocessorDefinitions': ['_DEBUG'], |
|
1987 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)', |
|
1988 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', |
|
1989 'conditions': [ |
|
1990 # According to MSVS, InlineFunctionExpansion=0 means |
|
1991 # "default inlining", not "/Ob0". |
|
1992 # Thus, we have to handle InlineFunctionExpansion==0 separately. |
|
1993 ['win_debug_InlineFunctionExpansion==0', { |
|
1994 'AdditionalOptions': ['/Ob0'], |
|
1995 }], |
|
1996 ['win_debug_InlineFunctionExpansion!=""', { |
|
1997 'InlineFunctionExpansion': |
|
1998 '<(win_debug_InlineFunctionExpansion)', |
|
1999 }], |
|
2000 ['win_debug_disable_iterator_debugging==1', { |
|
2001 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'], |
|
2002 }], |
|
2003 |
|
2004 # if win_debug_OmitFramePointers is blank, leave as default |
|
2005 ['win_debug_OmitFramePointers==1', { |
|
2006 'OmitFramePointers': 'true', |
|
2007 }], |
|
2008 ['win_debug_OmitFramePointers==0', { |
|
2009 'OmitFramePointers': 'false', |
|
2010 # The above is not sufficient (http://crbug.com/106711): it |
|
2011 # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
|
2012 # perform FPO regardless, so we must explicitly disable. |
|
2013 # We still want the false setting above to avoid having |
|
2014 # "/Oy /Oy-" and warnings about overriding. |
|
2015 'AdditionalOptions': ['/Oy-'], |
|
2016 }], |
|
2017 ], |
|
2018 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], |
|
2019 }, |
|
2020 'VCLinkerTool': { |
|
2021 'LinkIncremental': '<(msvs_debug_link_incremental)', |
|
2022 # ASLR makes debugging with windbg difficult because Chrome.exe and |
|
2023 # Chrome.dll share the same base name. As result, windbg will |
|
2024 # name the Chrome.dll module like chrome_<base address>, where |
|
2025 # <base address> typically changes with each launch. This in turn |
|
2026 # means that breakpoints in Chrome.dll don't stick from one launch |
|
2027 # to the next. For this reason, we turn ASLR off in debug builds. |
|
2028 # Note that this is a three-way bool, where 0 means to pick up |
|
2029 # the default setting, 1 is off and 2 is on. |
|
2030 'RandomizedBaseAddress': 1, |
|
2031 }, |
|
2032 'VCResourceCompilerTool': { |
|
2033 'PreprocessorDefinitions': ['_DEBUG'], |
|
2034 }, |
|
2035 }, |
|
2036 'conditions': [ |
|
2037 ['OS=="linux" or OS=="android"', { |
|
2038 'target_conditions': [ |
|
2039 ['_toolset=="target"', { |
|
2040 'cflags': [ |
|
2041 '<@(debug_extra_cflags)', |
|
2042 ], |
|
2043 }], |
|
2044 ], |
|
2045 }], |
|
2046 # Disabled on iOS because it was causing a crash on startup. |
|
2047 # TODO(michelea): investigate, create a reduced test and possibly |
|
2048 # submit a radar. |
|
2049 ['release_valgrind_build==0 and OS!="ios"', { |
|
2050 'xcode_settings': { |
|
2051 'OTHER_CFLAGS': [ |
|
2052 '-fstack-protector-all', # Implies -fstack-protector |
|
2053 ], |
|
2054 }, |
|
2055 }], |
|
2056 ], |
|
2057 }, |
|
2058 'Release_Base': { |
|
2059 'abstract': 1, |
|
2060 'defines': [ |
|
2061 'NDEBUG', |
|
2062 ], |
|
2063 'xcode_settings': { |
|
2064 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip |
|
2065 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', |
|
2066 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], |
|
2067 }, |
|
2068 'msvs_settings': { |
|
2069 'VCCLCompilerTool': { |
|
2070 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', |
|
2071 'conditions': [ |
|
2072 # In official builds, each target will self-select |
|
2073 # an optimization level. |
|
2074 ['buildtype!="Official"', { |
|
2075 'Optimization': '<(win_release_Optimization)', |
|
2076 }, |
|
2077 ], |
|
2078 # According to MSVS, InlineFunctionExpansion=0 means |
|
2079 # "default inlining", not "/Ob0". |
|
2080 # Thus, we have to handle InlineFunctionExpansion==0 separately. |
|
2081 ['win_release_InlineFunctionExpansion==0', { |
|
2082 'AdditionalOptions': ['/Ob0'], |
|
2083 }], |
|
2084 ['win_release_InlineFunctionExpansion!=""', { |
|
2085 'InlineFunctionExpansion': |
|
2086 '<(win_release_InlineFunctionExpansion)', |
|
2087 }], |
|
2088 |
|
2089 # if win_release_OmitFramePointers is blank, leave as default |
|
2090 ['win_release_OmitFramePointers==1', { |
|
2091 'OmitFramePointers': 'true', |
|
2092 }], |
|
2093 ['win_release_OmitFramePointers==0', { |
|
2094 'OmitFramePointers': 'false', |
|
2095 # The above is not sufficient (http://crbug.com/106711): it |
|
2096 # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
|
2097 # perform FPO regardless, so we must explicitly disable. |
|
2098 # We still want the false setting above to avoid having |
|
2099 # "/Oy /Oy-" and warnings about overriding. |
|
2100 'AdditionalOptions': ['/Oy-'], |
|
2101 }], |
|
2102 ], |
|
2103 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ], |
|
2104 }, |
|
2105 'VCLinkerTool': { |
|
2106 # LinkIncremental is a tri-state boolean, where 0 means default |
|
2107 # (i.e., inherit from parent solution), 1 means false, and |
|
2108 # 2 means true. |
|
2109 'LinkIncremental': '1', |
|
2110 # This corresponds to the /PROFILE flag which ensures the PDB |
|
2111 # file contains FIXUP information (growing the PDB file by about |
|
2112 # 5%) but does not otherwise alter the output binary. This |
|
2113 # information is used by the Syzygy optimization tool when |
|
2114 # decomposing the release image. |
|
2115 'Profile': 'true', |
|
2116 }, |
|
2117 }, |
|
2118 'conditions': [ |
|
2119 ['msvs_use_common_release', { |
|
2120 'includes': ['release.gypi'], |
|
2121 }], |
|
2122 ['release_valgrind_build==0', { |
|
2123 'defines': [ |
|
2124 'NVALGRIND', |
|
2125 'DYNAMIC_ANNOTATIONS_ENABLED=0', |
|
2126 ], |
|
2127 }, { |
|
2128 'defines': [ |
|
2129 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
|
2130 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
|
2131 ], |
|
2132 }], |
|
2133 ['win_use_allocator_shim==0', { |
|
2134 'defines': ['NO_TCMALLOC'], |
|
2135 }], |
|
2136 ['OS=="linux"', { |
|
2137 'target_conditions': [ |
|
2138 ['_toolset=="target"', { |
|
2139 'cflags': [ |
|
2140 '<@(release_extra_cflags)', |
|
2141 ], |
|
2142 }], |
|
2143 ], |
|
2144 }], |
|
2145 ], |
|
2146 }, |
|
2147 # |
|
2148 # Concrete configurations |
|
2149 # |
|
2150 'Debug': { |
|
2151 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], |
|
2152 }, |
|
2153 'Release': { |
|
2154 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
|
2155 }, |
|
2156 'conditions': [ |
|
2157 [ 'OS=="win"', { |
|
2158 # TODO(bradnelson): add a gyp mechanism to make this more graceful. |
|
2159 'Debug_x64': { |
|
2160 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], |
|
2161 }, |
|
2162 'Release_x64': { |
|
2163 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], |
|
2164 }, |
|
2165 }], |
|
2166 ], |
|
2167 }, |
|
2168 }, |
|
2169 'conditions': [ |
|
2170 ['os_posix==1 and OS!="mac" and OS!="ios"', { |
|
2171 'target_defaults': { |
|
2172 # Enable -Werror by default, but put it in a variable so it can |
|
2173 # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
|
2174 'variables': { |
|
2175 'werror%': '-Werror', |
|
2176 'libraries_for_target%': '', |
|
2177 }, |
|
2178 'defines': [ |
|
2179 '_FILE_OFFSET_BITS=64', |
|
2180 ], |
|
2181 'cflags': [ |
|
2182 '<(werror)', # See note above about the werror variable. |
|
2183 '-pthread', |
|
2184 '-fno-exceptions', |
|
2185 '-fno-strict-aliasing', # See http://crbug.com/32204 |
|
2186 '-Wall', |
|
2187 # TODO(evan): turn this back on once all the builds work. |
|
2188 # '-Wextra', |
|
2189 # Don't warn about unused function params. We use those everywhere. |
|
2190 '-Wno-unused-parameter', |
|
2191 # Don't warn about the "struct foo f = {0};" initialization pattern. |
|
2192 '-Wno-missing-field-initializers', |
|
2193 # Don't export any symbols (for example, to plugins we dlopen()). |
|
2194 # Note: this is *required* to make some plugins work. |
|
2195 '-fvisibility=hidden', |
|
2196 '-pipe', |
|
2197 ], |
|
2198 'cflags_cc': [ |
|
2199 '-fno-rtti', |
|
2200 '-fno-threadsafe-statics', |
|
2201 # Make inline functions have hidden visiblity by default. |
|
2202 # Surprisingly, not covered by -fvisibility=hidden. |
|
2203 '-fvisibility-inlines-hidden', |
|
2204 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, |
|
2205 # so we specify it explicitly. |
|
2206 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it. |
|
2207 # http://code.google.com/p/chromium/issues/detail?id=90453 |
|
2208 '-Wsign-compare', |
|
2209 ], |
|
2210 'ldflags': [ |
|
2211 '-pthread', '-Wl,-z,noexecstack', |
|
2212 ], |
|
2213 'libraries' : [ |
|
2214 '<(libraries_for_target)', |
|
2215 ], |
|
2216 'configurations': { |
|
2217 'Debug_Base': { |
|
2218 'variables': { |
|
2219 'debug_optimize%': '0', |
|
2220 }, |
|
2221 'defines': [ |
|
2222 '_DEBUG', |
|
2223 ], |
|
2224 'cflags': [ |
|
2225 '-O>(debug_optimize)', |
|
2226 '-g', |
|
2227 ], |
|
2228 'conditions' : [ |
|
2229 ['OS=="android" and android_full_debug==0', { |
|
2230 # Some configurations are copied from Release_Base to reduce |
|
2231 # the binary size. |
|
2232 'variables': { |
|
2233 'debug_optimize%': 's', |
|
2234 }, |
|
2235 'cflags': [ |
|
2236 '-fomit-frame-pointer', |
|
2237 '-fdata-sections', |
|
2238 '-ffunction-sections', |
|
2239 ], |
|
2240 'ldflags': [ |
|
2241 '-Wl,-O1', |
|
2242 '-Wl,--as-needed', |
|
2243 '-Wl,--gc-sections', |
|
2244 ], |
|
2245 }], |
|
2246 ], |
|
2247 }, |
|
2248 'Release_Base': { |
|
2249 'variables': { |
|
2250 'release_optimize%': '2', |
|
2251 # Binaries become big and gold is unable to perform GC |
|
2252 # and remove unused sections for some of test targets |
|
2253 # on 32 bit platform. |
|
2254 # (This is currently observed only in chromeos valgrind bots) |
|
2255 # The following flag is to disable --gc-sections linker |
|
2256 # option for these bots. |
|
2257 'no_gc_sections%': 0, |
|
2258 |
|
2259 # TODO(bradnelson): reexamine how this is done if we change the |
|
2260 # expansion of configurations |
|
2261 'release_valgrind_build%': 0, |
|
2262 }, |
|
2263 'cflags': [ |
|
2264 '-O<(release_optimize)', |
|
2265 # Don't emit the GCC version ident directives, they just end up |
|
2266 # in the .comment section taking up binary size. |
|
2267 '-fno-ident', |
|
2268 # Put data and code in their own sections, so that unused symbols |
|
2269 # can be removed at link time with --gc-sections. |
|
2270 '-fdata-sections', |
|
2271 '-ffunction-sections', |
|
2272 ], |
|
2273 'ldflags': [ |
|
2274 # Specifically tell the linker to perform optimizations. |
|
2275 # See http://lwn.net/Articles/192624/ . |
|
2276 '-Wl,-O1', |
|
2277 '-Wl,--as-needed', |
|
2278 ], |
|
2279 'conditions' : [ |
|
2280 ['no_gc_sections==0', { |
|
2281 'ldflags': [ |
|
2282 '-Wl,--gc-sections', |
|
2283 ], |
|
2284 }], |
|
2285 ['OS=="android"', { |
|
2286 'variables': { |
|
2287 'release_optimize%': 's', |
|
2288 }, |
|
2289 'cflags': [ |
|
2290 '-fomit-frame-pointer', |
|
2291 ], |
|
2292 }], |
|
2293 ['clang==1', { |
|
2294 'cflags!': [ |
|
2295 '-fno-ident', |
|
2296 ], |
|
2297 }], |
|
2298 ['profiling==1', { |
|
2299 'cflags': [ |
|
2300 '-fno-omit-frame-pointer', |
|
2301 '-g', |
|
2302 ], |
|
2303 }], |
|
2304 ], |
|
2305 }, |
|
2306 }, |
|
2307 'variants': { |
|
2308 'coverage': { |
|
2309 'cflags': ['-fprofile-arcs', '-ftest-coverage'], |
|
2310 'ldflags': ['-fprofile-arcs'], |
|
2311 }, |
|
2312 'profile': { |
|
2313 'cflags': ['-pg', '-g'], |
|
2314 'ldflags': ['-pg'], |
|
2315 }, |
|
2316 'symbols': { |
|
2317 'cflags': ['-g'], |
|
2318 }, |
|
2319 }, |
|
2320 'conditions': [ |
|
2321 ['target_arch=="ia32"', { |
|
2322 'target_conditions': [ |
|
2323 ['_toolset=="target"', { |
|
2324 'asflags': [ |
|
2325 # Needed so that libs with .s files (e.g. libicudata.a) |
|
2326 # are compatible with the general 32-bit-ness. |
|
2327 '-32', |
|
2328 ], |
|
2329 # All floating-point computations on x87 happens in 80-bit |
|
2330 # precision. Because the C and C++ language standards allow |
|
2331 # the compiler to keep the floating-point values in higher |
|
2332 # precision than what's specified in the source and doing so |
|
2333 # is more efficient than constantly rounding up to 64-bit or |
|
2334 # 32-bit precision as specified in the source, the compiler, |
|
2335 # especially in the optimized mode, tries very hard to keep |
|
2336 # values in x87 floating-point stack (in 80-bit precision) |
|
2337 # as long as possible. This has important side effects, that |
|
2338 # the real value used in computation may change depending on |
|
2339 # how the compiler did the optimization - that is, the value |
|
2340 # kept in 80-bit is different than the value rounded down to |
|
2341 # 64-bit or 32-bit. There are possible compiler options to |
|
2342 # make this behavior consistent (e.g. -ffloat-store would keep |
|
2343 # all floating-values in the memory, thus force them to be |
|
2344 # rounded to its original precision) but they have significant |
|
2345 # runtime performance penalty. |
|
2346 # |
|
2347 # -mfpmath=sse -msse2 makes the compiler use SSE instructions |
|
2348 # which keep floating-point values in SSE registers in its |
|
2349 # native precision (32-bit for single precision, and 64-bit |
|
2350 # for double precision values). This means the floating-point |
|
2351 # value used during computation does not change depending on |
|
2352 # how the compiler optimized the code, since the value is |
|
2353 # always kept in its specified precision. |
|
2354 'conditions': [ |
|
2355 ['branding=="Chromium" and disable_sse2==0', { |
|
2356 'cflags': [ |
|
2357 '-march=pentium4', |
|
2358 '-msse2', |
|
2359 '-mfpmath=sse', |
|
2360 ], |
|
2361 }], |
|
2362 # ChromeOS targets Pinetrail, which is sse3, but most of the |
|
2363 # benefit comes from sse2 so this setting allows ChromeOS |
|
2364 # to build on other CPUs. In the future -march=atom would |
|
2365 # help but requires a newer compiler. |
|
2366 ['chromeos==1 and disable_sse2==0', { |
|
2367 'cflags': [ |
|
2368 '-msse2', |
|
2369 ], |
|
2370 }], |
|
2371 # Install packages have started cropping up with |
|
2372 # different headers between the 32-bit and 64-bit |
|
2373 # versions, so we have to shadow those differences off |
|
2374 # and make sure a 32-bit-on-64-bit build picks up the |
|
2375 # right files. |
|
2376 # For android build, use NDK headers instead of host headers |
|
2377 ['host_arch!="ia32" and OS!="android"', { |
|
2378 'include_dirs+': [ |
|
2379 '/usr/include32', |
|
2380 ], |
|
2381 }], |
|
2382 ], |
|
2383 'target_conditions': [ |
|
2384 ['_toolset=="target" and OS!="android"', { |
|
2385 # -mmmx allows mmintrin.h to be used for mmx intrinsics. |
|
2386 # video playback is mmx and sse2 optimized. |
|
2387 'cflags': [ |
|
2388 '-m32', |
|
2389 '-mmmx', |
|
2390 ], |
|
2391 'ldflags': [ |
|
2392 '-m32', |
|
2393 ], |
|
2394 'cflags_mozilla': [ |
|
2395 '-m32', |
|
2396 '-mmmx', |
|
2397 ], |
|
2398 }], |
|
2399 ], |
|
2400 }], |
|
2401 ], |
|
2402 }], |
|
2403 ['target_arch=="arm"', { |
|
2404 'target_conditions': [ |
|
2405 ['_toolset=="target"', { |
|
2406 'cflags_cc': [ |
|
2407 # The codesourcery arm-2009q3 toolchain warns at that the ABI |
|
2408 # has changed whenever it encounters a varargs function. This |
|
2409 # silences those warnings, as they are not helpful and |
|
2410 # clutter legitimate warnings. |
|
2411 '-Wno-abi', |
|
2412 ], |
|
2413 'conditions': [ |
|
2414 ['arm_thumb==1', { |
|
2415 'cflags': [ |
|
2416 '-mthumb', |
|
2417 ] |
|
2418 }], |
|
2419 ['armv7==1', { |
|
2420 'cflags': [ |
|
2421 '-march=armv7-a', |
|
2422 '-mtune=cortex-a8', |
|
2423 '-mfloat-abi=<(arm_float_abi)', |
|
2424 ], |
|
2425 'conditions': [ |
|
2426 ['arm_neon==1', { |
|
2427 'cflags': [ '-mfpu=neon', ], |
|
2428 }, { |
|
2429 'cflags': [ '-mfpu=<(arm_fpu)', ], |
|
2430 }], |
|
2431 ], |
|
2432 }], |
|
2433 ['OS=="android"', { |
|
2434 # Most of the following flags are derived from what Android |
|
2435 # uses by default when building for arm, reference for which |
|
2436 # can be found in the following file in the Android NDK: |
|
2437 # toolchains/arm-linux-androideabi-4.4.3/setup.mk |
|
2438 'cflags': [ |
|
2439 # The tree-sra optimization (scalar replacement for |
|
2440 # aggregates enabling subsequent optimizations) leads to |
|
2441 # invalid code generation when using the Android NDK's |
|
2442 # compiler (r5-r7). This can be verified using |
|
2443 # TestWebKitAPI's WTF.Checked_int8_t test. |
|
2444 '-fno-tree-sra', |
|
2445 '-fuse-ld=gold', |
|
2446 '-Wno-psabi', |
|
2447 ], |
|
2448 # Android now supports .relro sections properly. |
|
2449 # NOTE: While these flags enable the generation of .relro |
|
2450 # sections, the generated libraries can still be loaded on |
|
2451 # older Android platform versions. |
|
2452 'ldflags': [ |
|
2453 '-Wl,-z,relro', |
|
2454 '-Wl,-z,now', |
|
2455 '-fuse-ld=gold', |
|
2456 ], |
|
2457 'conditions': [ |
|
2458 ['arm_thumb == 1', { |
|
2459 # Android toolchain doesn't support -mimplicit-it=thumb |
|
2460 'cflags!': [ '-Wa,-mimplicit-it=thumb', ], |
|
2461 'cflags': [ '-mthumb-interwork', ], |
|
2462 }], |
|
2463 ['armv7==0', { |
|
2464 # Flags suitable for Android emulator |
|
2465 'cflags': [ |
|
2466 '-march=armv5te', |
|
2467 '-mtune=xscale', |
|
2468 '-msoft-float', |
|
2469 ], |
|
2470 'defines': [ |
|
2471 '__ARM_ARCH_5__', |
|
2472 '__ARM_ARCH_5T__', |
|
2473 '__ARM_ARCH_5E__', |
|
2474 '__ARM_ARCH_5TE__', |
|
2475 ], |
|
2476 }], |
|
2477 ['clang==1', { |
|
2478 'cflags!': [ |
|
2479 # Clang does not support the following options. |
|
2480 '-mthumb-interwork', |
|
2481 '-finline-limit=64', |
|
2482 '-fno-tree-sra', |
|
2483 '-fuse-ld=gold', |
|
2484 '-Wno-psabi', |
|
2485 ], |
|
2486 }], |
|
2487 ], |
|
2488 }], |
|
2489 ], |
|
2490 }], |
|
2491 ], |
|
2492 }], |
|
2493 ['linux_fpic==1', { |
|
2494 'cflags': [ |
|
2495 '-fPIC', |
|
2496 ], |
|
2497 'ldflags': [ |
|
2498 '-fPIC', |
|
2499 ], |
|
2500 }], |
|
2501 ['sysroot!=""', { |
|
2502 'target_conditions': [ |
|
2503 ['_toolset=="target"', { |
|
2504 'cflags': [ |
|
2505 '--sysroot=<(sysroot)', |
|
2506 ], |
|
2507 'ldflags': [ |
|
2508 '--sysroot=<(sysroot)', |
|
2509 ], |
|
2510 }]] |
|
2511 }], |
|
2512 ['clang==1', { |
|
2513 'cflags': [ |
|
2514 '-Wheader-hygiene', |
|
2515 # Clang spots more unused functions. |
|
2516 '-Wno-unused-function', |
|
2517 # Don't die on dtoa code that uses a char as an array index. |
|
2518 '-Wno-char-subscripts', |
|
2519 # Especially needed for gtest macros using enum values from Mac |
|
2520 # system headers. |
|
2521 # TODO(pkasting): In C++11 this is legal, so this should be |
|
2522 # removed when we change to that. (This is also why we don't |
|
2523 # bother fixing all these cases today.) |
|
2524 '-Wno-unnamed-type-template-args', |
|
2525 # This (rightyfully) complains about 'override', which we use |
|
2526 # heavily. |
|
2527 '-Wno-c++11-extensions', |
|
2528 |
|
2529 # Warns on switches on enums that cover all enum values but |
|
2530 # also contain a default: branch. Chrome is full of that. |
|
2531 '-Wno-covered-switch-default', |
|
2532 |
|
2533 # TODO(thakis): Remove this. |
|
2534 '-Wno-implicit-conversion-floating-point-to-bool', |
|
2535 ], |
|
2536 'cflags!': [ |
|
2537 # Clang doesn't seem to know know this flag. |
|
2538 '-mfpmath=sse', |
|
2539 ], |
|
2540 }], |
|
2541 ['clang==1 and clang_use_chrome_plugins==1', { |
|
2542 'cflags': [ |
|
2543 '<@(clang_chrome_plugins_flags)', |
|
2544 ], |
|
2545 }], |
|
2546 ['clang==1 and clang_load!=""', { |
|
2547 'cflags': [ |
|
2548 '-Xclang', '-load', '-Xclang', '<(clang_load)', |
|
2549 ], |
|
2550 }], |
|
2551 ['clang==1 and clang_add_plugin!=""', { |
|
2552 'cflags': [ |
|
2553 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
|
2554 ], |
|
2555 }], |
|
2556 ['clang==1 and "<(GENERATOR)"=="ninja"', { |
|
2557 'cflags': [ |
|
2558 # See http://crbug.com/110262 |
|
2559 '-fcolor-diagnostics', |
|
2560 ], |
|
2561 }], |
|
2562 ['asan==1', { |
|
2563 'target_conditions': [ |
|
2564 ['_toolset=="target"', { |
|
2565 'cflags': [ |
|
2566 '-faddress-sanitizer', |
|
2567 '-fno-omit-frame-pointer', |
|
2568 ], |
|
2569 'ldflags': [ |
|
2570 '-faddress-sanitizer', |
|
2571 ], |
|
2572 'defines': [ |
|
2573 'ADDRESS_SANITIZER', |
|
2574 ], |
|
2575 }], |
|
2576 ], |
|
2577 }], |
|
2578 ['tsan==1', { |
|
2579 'target_conditions': [ |
|
2580 ['_toolset=="target"', { |
|
2581 'cflags': [ |
|
2582 '-fthread-sanitizer', |
|
2583 '-fno-omit-frame-pointer', |
|
2584 '-fPIE', |
|
2585 ], |
|
2586 'ldflags': [ |
|
2587 '-fthread-sanitizer', |
|
2588 ], |
|
2589 'defines': [ |
|
2590 'THREAD_SANITIZER', |
|
2591 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1', |
|
2592 ], |
|
2593 'target_conditions': [ |
|
2594 ['_type=="executable"', { |
|
2595 'ldflags': [ |
|
2596 '-pie', |
|
2597 ], |
|
2598 }], |
|
2599 ], |
|
2600 }], |
|
2601 ], |
|
2602 }], |
|
2603 ['order_profiling!=0 and (chromeos==1 or OS=="linux")', { |
|
2604 'target_conditions' : [ |
|
2605 ['_toolset=="target"', { |
|
2606 'cflags': [ |
|
2607 '-finstrument-functions', |
|
2608 # Allow mmx intrinsics to inline, so that the |
|
2609 # compiler can expand the intrinsics. |
|
2610 '-finstrument-functions-exclude-file-list=mmintrin.h', |
|
2611 ], |
|
2612 }], |
|
2613 ], |
|
2614 }], |
|
2615 ['linux_breakpad==1', { |
|
2616 'cflags': [ '-g' ], |
|
2617 'defines': ['USE_LINUX_BREAKPAD'], |
|
2618 }], |
|
2619 ['linux_use_heapchecker==1', { |
|
2620 'variables': {'linux_use_tcmalloc%': 1}, |
|
2621 'defines': ['USE_HEAPCHECKER'], |
|
2622 }], |
|
2623 ['linux_use_tcmalloc==0', { |
|
2624 'defines': ['NO_TCMALLOC'], |
|
2625 }], |
|
2626 ['linux_keep_shadow_stacks==1', { |
|
2627 'defines': ['KEEP_SHADOW_STACKS'], |
|
2628 'cflags': [ |
|
2629 '-finstrument-functions', |
|
2630 # Allow mmx intrinsics to inline, so that the compiler can expand |
|
2631 # the intrinsics. |
|
2632 '-finstrument-functions-exclude-file-list=mmintrin.h', |
|
2633 ], |
|
2634 }], |
|
2635 ['linux_use_gold_flags==1', { |
|
2636 'ldflags': [ |
|
2637 # Experimentation found that using four linking threads |
|
2638 # saved ~20% of link time. |
|
2639 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 |
|
2640 '-Wl,--threads', |
|
2641 '-Wl,--thread-count=4', |
|
2642 ], |
|
2643 'conditions': [ |
|
2644 ['release_valgrind_build==0', { |
|
2645 'target_conditions': [ |
|
2646 ['_toolset=="target"', { |
|
2647 'ldflags': [ |
|
2648 # There seems to be a conflict of --icf and -pie |
|
2649 # in gold which can generate crashy binaries. As |
|
2650 # a security measure, -pie takes precendence for |
|
2651 # now. |
|
2652 #'-Wl,--icf=safe', |
|
2653 '-Wl,--icf=none', |
|
2654 ], |
|
2655 }], |
|
2656 ], |
|
2657 }], |
|
2658 ], |
|
2659 }], |
|
2660 ['linux_use_gold_binary==1', { |
|
2661 'variables': { |
|
2662 'conditions': [ |
|
2663 ['inside_chromium_build==1', { |
|
2664 # We pass the path to gold to the compiler. gyp leaves |
|
2665 # unspecified what the cwd is when running the compiler, |
|
2666 # so the normal gyp path-munging fails us. This hack |
|
2667 # gets the right path. |
|
2668 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold', |
|
2669 }, { |
|
2670 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold', |
|
2671 }] |
|
2672 ] |
|
2673 }, |
|
2674 'ldflags': [ |
|
2675 # Put our gold binary in the search path for the linker. |
|
2676 '-B<(gold_path)', |
|
2677 ], |
|
2678 }], |
|
2679 ], |
|
2680 }, |
|
2681 }], |
|
2682 # FreeBSD-specific options; note that most FreeBSD options are set above, |
|
2683 # with Linux. |
|
2684 ['OS=="freebsd"', { |
|
2685 'target_defaults': { |
|
2686 'ldflags': [ |
|
2687 '-Wl,--no-keep-memory', |
|
2688 ], |
|
2689 }, |
|
2690 }], |
|
2691 # Android-specific options; note that most are set above with Linux. |
|
2692 ['OS=="android"', { |
|
2693 'variables': { |
|
2694 # This is the id for the archived chrome symbols. Each build that |
|
2695 # archives symbols is assigned an id which is then added to GYP_DEFINES. |
|
2696 # This is written to the device log on crashes just prior to dropping a |
|
2697 # tombstone. Tools can determine the location of the archived symbols |
|
2698 # from the id. |
|
2699 'chrome_symbols_id%': '', |
|
2700 'conditions': [ |
|
2701 # Use shared stlport library when system one used. |
|
2702 # Figure this out early since it needs symbols from libgcc.a, so it |
|
2703 # has to be before that in the set of libraries. |
|
2704 ['use_system_stlport==1', { |
|
2705 'android_stlport_library': 'stlport', |
|
2706 }, { |
|
2707 'android_stlport_library': 'stlport_static', |
|
2708 }], |
|
2709 ], |
|
2710 |
|
2711 # Placing this variable here prevents from forking libvpx, used |
|
2712 # by remoting. Remoting is off, so it needn't built, |
|
2713 # so forking it's deps seems like overkill. |
|
2714 # But this variable need defined to properly run gyp. |
|
2715 # A proper solution is to have an OS==android conditional |
|
2716 # in third_party/libvpx/libvpx.gyp to define it. |
|
2717 'libvpx_path': 'lib/linux/arm', |
|
2718 }, |
|
2719 'target_defaults': { |
|
2720 'variables': { |
|
2721 'release_extra_cflags%': '', |
|
2722 }, |
|
2723 |
|
2724 'target_conditions': [ |
|
2725 # Settings for building device targets using Android's toolchain. |
|
2726 # These are based on the setup.mk file from the Android NDK. |
|
2727 # |
|
2728 # The NDK Android executable link step looks as follows: |
|
2729 # $LDFLAGS |
|
2730 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o |
|
2731 # $(PRIVATE_OBJECTS) <-- The .o that we built |
|
2732 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
|
2733 # $(TARGET_LIBGCC) <-- libgcc.a |
|
2734 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
|
2735 # $(PRIVATE_LDLIBS) <-- System .so |
|
2736 # $(TARGET_CRTEND_O) <-- crtend.o |
|
2737 # |
|
2738 # For now the above are approximated for executables by adding |
|
2739 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end |
|
2740 # of 'libraries'. |
|
2741 # |
|
2742 # The NDK Android shared library link step looks as follows: |
|
2743 # $LDFLAGS |
|
2744 # $(PRIVATE_OBJECTS) <-- The .o that we built |
|
2745 # -l,--whole-archive |
|
2746 # $(PRIVATE_WHOLE_STATIC_LIBRARIES) |
|
2747 # -l,--no-whole-archive |
|
2748 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
|
2749 # $(TARGET_LIBGCC) <-- libgcc.a |
|
2750 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
|
2751 # $(PRIVATE_LDLIBS) <-- System .so |
|
2752 # |
|
2753 # For now, assume that whole static libraries are not needed. |
|
2754 # |
|
2755 # For both executables and shared libraries, add the proper |
|
2756 # libgcc.a to the start of libraries which puts it in the |
|
2757 # proper spot after .o and .a files get linked in. |
|
2758 # |
|
2759 # TODO: The proper thing to do longer-tem would be proper gyp |
|
2760 # support for a custom link command line. |
|
2761 ['_toolset=="target"', { |
|
2762 'conditions': [ |
|
2763 ['build_with_mozilla==0', { |
|
2764 'cflags!': [ |
|
2765 '-pthread', # Not supported by Android toolchain. |
|
2766 ], |
|
2767 'cflags': [ |
|
2768 '-ffunction-sections', |
|
2769 '-funwind-tables', |
|
2770 '-g', |
|
2771 '-fstack-protector', |
|
2772 '-fno-short-enums', |
|
2773 '-finline-limit=64', |
|
2774 '-Wa,--noexecstack', |
|
2775 '<@(release_extra_cflags)', |
|
2776 ], |
|
2777 'ldflags!': [ |
|
2778 '-pthread', # Not supported by Android toolchain. |
|
2779 ], |
|
2780 'ldflags': [ |
|
2781 '-nostdlib', |
|
2782 '-Wl,--no-undefined', |
|
2783 # Don't export symbols from statically linked libraries. |
|
2784 '-Wl,--exclude-libs=ALL', |
|
2785 ], |
|
2786 'libraries': [ |
|
2787 '-l<(android_stlport_library)', |
|
2788 # Manually link the libgcc.a that the cross compiler uses. |
|
2789 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
|
2790 '-lc', |
|
2791 '-ldl', |
|
2792 '-lstdc++', |
|
2793 '-lm', |
|
2794 ], |
|
2795 'conditions': [ |
|
2796 ['android_upstream_bringup==1', { |
|
2797 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',], |
|
2798 }], |
|
2799 ['clang==1', { |
|
2800 'cflags': [ |
|
2801 # Work around incompatibilities between bionic and clang |
|
2802 # headers. |
|
2803 '-D__compiler_offsetof=__builtin_offsetof', |
|
2804 '-Dnan=__builtin_nan', |
|
2805 ], |
|
2806 'conditions': [ |
|
2807 ['target_arch=="arm"', { |
|
2808 'cflags': [ |
|
2809 '-target arm-linux-androideabi', |
|
2810 '-mllvm -arm-enable-ehabi', |
|
2811 ], |
|
2812 'ldflags': [ |
|
2813 '-target arm-linux-androideabi', |
|
2814 ], |
|
2815 }], |
|
2816 ['target_arch=="ia32"', { |
|
2817 'cflags': [ |
|
2818 '-target x86-linux-androideabi', |
|
2819 ], |
|
2820 'ldflags': [ |
|
2821 '-target x86-linux-androideabi', |
|
2822 ], |
|
2823 }], |
|
2824 ], |
|
2825 }], |
|
2826 ['android_build_type==0', { |
|
2827 'defines': [ |
|
2828 # The NDK has these things, but doesn't define the constants |
|
2829 # to say that it does. Define them here instead. |
|
2830 'HAVE_SYS_UIO_H', |
|
2831 ], |
|
2832 'cflags': [ |
|
2833 '--sysroot=<(android_ndk_sysroot)', |
|
2834 ], |
|
2835 'ldflags': [ |
|
2836 '--sysroot=<(android_ndk_sysroot)', |
|
2837 ], |
|
2838 }], |
|
2839 ['android_build_type==1', { |
|
2840 'include_dirs': [ |
|
2841 # OpenAL headers from the Android tree. |
|
2842 '<(android_src)/frameworks/wilhelm/include', |
|
2843 ], |
|
2844 'cflags': [ |
|
2845 # Chromium builds its own (non-third-party) code with |
|
2846 # -Werror to make all warnings into errors. However, Android |
|
2847 # enables warnings that Chromium doesn't, so some of these |
|
2848 # extra warnings trip and break things. |
|
2849 # For now, we leave these warnings enabled but prevent them |
|
2850 # from being treated as errors. |
|
2851 # |
|
2852 # Things that are part of -Wextra: |
|
2853 '-Wno-error=extra', # Enabled by -Wextra, but no specific flag |
|
2854 '-Wno-error=ignored-qualifiers', |
|
2855 '-Wno-error=type-limits', |
|
2856 # Other things unrelated to -Wextra: |
|
2857 '-Wno-error=non-virtual-dtor', |
|
2858 '-Wno-error=sign-promo', |
|
2859 ], |
|
2860 'cflags_cc': [ |
|
2861 # Disabling c++0x-compat should be handled in WebKit, but |
|
2862 # this currently doesn't work because gcc_version is not set |
|
2863 # correctly when building with the Android build system. |
|
2864 # TODO(torne): Fix this in WebKit. |
|
2865 '-Wno-error=c++0x-compat', |
|
2866 ], |
|
2867 }], |
|
2868 ['android_build_type==1 and chromium_code==0', { |
|
2869 'cflags': [ |
|
2870 # There is a class of warning which: |
|
2871 # 1) Android always enables and also treats as errors |
|
2872 # 2) Chromium ignores in third party code |
|
2873 # For now, I am leaving these warnings enabled but preventing |
|
2874 # them from being treated as errors here. |
|
2875 '-Wno-error=address', |
|
2876 '-Wno-error=format-security', |
|
2877 '-Wno-error=non-virtual-dtor', |
|
2878 '-Wno-error=return-type', |
|
2879 '-Wno-error=sequence-point', |
|
2880 ], |
|
2881 }], |
|
2882 ['target_arch == "arm"', { |
|
2883 'ldflags': [ |
|
2884 # Enable identical code folding to reduce size. |
|
2885 '-Wl,--icf=safe', |
|
2886 ], |
|
2887 }], |
|
2888 # NOTE: The stlport header include paths below are specified in |
|
2889 # cflags rather than include_dirs because they need to come |
|
2890 # after include_dirs. Think of them like system headers, but |
|
2891 # don't use '-isystem' because the arm-linux-androideabi-4.4.3 |
|
2892 # toolchain (circa Gingerbread) will exhibit strange errors. |
|
2893 # The include ordering here is important; change with caution. |
|
2894 ['use_system_stlport==1', { |
|
2895 'cflags': [ |
|
2896 # For libstdc++/include, which is used by stlport. |
|
2897 '-I<(android_src)/bionic', |
|
2898 '-I<(android_src)/external/stlport/stlport', |
|
2899 ], |
|
2900 }, { # else: use_system_stlport!=1 |
|
2901 'cflags': [ |
|
2902 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport', |
|
2903 ], |
|
2904 'conditions': [ |
|
2905 ['target_arch=="arm" and armv7==1', { |
|
2906 'ldflags': [ |
|
2907 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a', |
|
2908 ], |
|
2909 }], |
|
2910 ['target_arch=="arm" and armv7==0', { |
|
2911 'ldflags': [ |
|
2912 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi', |
|
2913 ], |
|
2914 }], |
|
2915 ['target_arch=="ia32"', { |
|
2916 'ldflags': [ |
|
2917 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86', |
|
2918 ], |
|
2919 }], |
|
2920 ], |
|
2921 }], |
|
2922 ['target_arch=="ia32"', { |
|
2923 # The x86 toolchain currently has problems with stack-protector. |
|
2924 'cflags!': [ |
|
2925 '-fstack-protector', |
|
2926 ], |
|
2927 'cflags': [ |
|
2928 '-fno-stack-protector', |
|
2929 ], |
|
2930 }], |
|
2931 ], |
|
2932 'target_conditions': [ |
|
2933 ['_type=="executable"', { |
|
2934 'ldflags': [ |
|
2935 '-Bdynamic', |
|
2936 '-Wl,-dynamic-linker,/system/bin/linker', |
|
2937 '-Wl,--gc-sections', |
|
2938 '-Wl,-z,nocopyreloc', |
|
2939 # crtbegin_dynamic.o should be the last item in ldflags. |
|
2940 '<(android_ndk_lib)/crtbegin_dynamic.o', |
|
2941 ], |
|
2942 'libraries': [ |
|
2943 # crtend_android.o needs to be the last item in libraries. |
|
2944 # Do not add any libraries after this! |
|
2945 '<(android_ndk_lib)/crtend_android.o', |
|
2946 ], |
|
2947 }], |
|
2948 ['_type=="shared_library" or _type=="loadable_module"', { |
|
2949 'ldflags': [ |
|
2950 '-Wl,-shared,-Bsymbolic', |
|
2951 # crtbegin_so.o should be the last item in ldflags. |
|
2952 '<(android_ndk_lib)/crtbegin_so.o', |
|
2953 ], |
|
2954 'libraries': [ |
|
2955 # crtend_so.o needs to be the last item in libraries. |
|
2956 # Do not add any libraries after this! |
|
2957 '<(android_ndk_lib)/crtend_so.o', |
|
2958 ], |
|
2959 }], |
|
2960 ], |
|
2961 |
|
2962 }], # build_with_mozilla== 0 |
|
2963 |
|
2964 ], |
|
2965 'defines': [ |
|
2966 'ANDROID', |
|
2967 '__GNU_SOURCE=1', # Necessary for clone() |
|
2968 'USE_STLPORT=1', |
|
2969 '_STLP_USE_PTR_SPECIALIZATIONS=1', |
|
2970 'CHROME_SYMBOLS_ID="<(chrome_symbols_id)"', |
|
2971 ], |
|
2972 }], |
|
2973 # Settings for building host targets using the system toolchain. |
|
2974 ['_toolset=="host"', { |
|
2975 'cflags!': [ |
|
2976 # Due to issues in Clang build system, using ASan on 32-bit |
|
2977 # binaries on x86_64 host is problematic. |
|
2978 # TODO(eugenis): re-enable. |
|
2979 '-faddress-sanitizer', |
|
2980 ], |
|
2981 'ldflags!': [ |
|
2982 '-faddress-sanitizer', |
|
2983 '-Wl,-z,noexecstack', |
|
2984 '-Wl,--gc-sections', |
|
2985 '-Wl,-O1', |
|
2986 '-Wl,--as-needed', |
|
2987 ], |
|
2988 'sources/': [ |
|
2989 ['exclude', '_android(_unittest)?\\.cc$'], |
|
2990 ['exclude', '(^|/)android/'] |
|
2991 ], |
|
2992 }], |
|
2993 ], |
|
2994 }, |
|
2995 }], |
|
2996 ['OS=="solaris"', { |
|
2997 'cflags!': ['-fvisibility=hidden'], |
|
2998 'cflags_cc!': ['-fvisibility-inlines-hidden'], |
|
2999 }], |
|
3000 ['OS=="mac" or OS=="ios"', { |
|
3001 'target_defaults': { |
|
3002 'mac_bundle': 0, |
|
3003 'xcode_settings': { |
|
3004 'ALWAYS_SEARCH_USER_PATHS': 'NO', |
|
3005 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99 |
|
3006 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks |
|
3007 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions |
|
3008 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti |
|
3009 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings |
|
3010 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden |
|
3011 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', |
|
3012 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors |
|
3013 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
|
3014 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics |
|
3015 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror |
|
3016 'GCC_VERSION': '4.2', |
|
3017 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof |
|
3018 'USE_HEADERMAP': 'NO', |
|
3019 'WARNING_CFLAGS': [ |
|
3020 '-Wall', |
|
3021 '-Wendif-labels', |
|
3022 '-Wextra', |
|
3023 # Don't warn about unused function parameters. |
|
3024 '-Wno-unused-parameter', |
|
3025 # Don't warn about the "struct foo f = {0};" initialization |
|
3026 # pattern. |
|
3027 '-Wno-missing-field-initializers', |
|
3028 ], |
|
3029 'conditions': [ |
|
3030 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, |
|
3031 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} |
|
3032 ], |
|
3033 ], |
|
3034 }, |
|
3035 'target_conditions': [ |
|
3036 ['_type!="static_library"', { |
|
3037 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
|
3038 }], |
|
3039 ['_mac_bundle', { |
|
3040 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
|
3041 }], |
|
3042 ], # target_conditions |
|
3043 }, # target_defaults |
|
3044 }], # OS=="mac" or OS=="ios" |
|
3045 ['OS=="mac"', { |
|
3046 'target_defaults': { |
|
3047 'variables': { |
|
3048 # These should end with %, but there seems to be a bug with % in |
|
3049 # variables that are intended to be set to different values in |
|
3050 # different targets, like these. |
|
3051 'mac_pie': 1, # Most executables can be position-independent. |
|
3052 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. |
|
3053 # Strip debugging symbols from the target. |
|
3054 'mac_strip': '<(mac_strip_release)', |
|
3055 }, |
|
3056 'xcode_settings': { |
|
3057 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
|
3058 # (Equivalent to -fPIC) |
|
3059 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min |
|
3060 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
|
3061 # Keep pch files below xcodebuild/. |
|
3062 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders', |
|
3063 'OTHER_CFLAGS': [ |
|
3064 '-fno-strict-aliasing', # See http://crbug.com/32204 |
|
3065 ], |
|
3066 'conditions': [ |
|
3067 ['clang==1', { |
|
3068 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', |
|
3069 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', |
|
3070 |
|
3071 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default |
|
3072 # when buliding with clang. This warning is triggered when the |
|
3073 # override keyword is used via the OVERRIDE macro from |
|
3074 # base/compiler_specific.h. |
|
3075 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', |
|
3076 |
|
3077 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
|
3078 'WARNING_CFLAGS': [ |
|
3079 '-Wheader-hygiene', |
|
3080 # Don't die on dtoa code that uses a char as an array index. |
|
3081 # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
|
3082 '-Wno-char-subscripts', |
|
3083 # Clang spots more unused functions. |
|
3084 '-Wno-unused-function', |
|
3085 # See comments on this flag higher up in this file. |
|
3086 '-Wno-unnamed-type-template-args', |
|
3087 # This (rightyfully) complains about 'override', which we use |
|
3088 # heavily. |
|
3089 '-Wno-c++11-extensions', |
|
3090 |
|
3091 # Warns on switches on enums that cover all enum values but |
|
3092 # also contain a default: branch. Chrome is full of that. |
|
3093 '-Wno-covered-switch-default', |
|
3094 |
|
3095 # TODO(thakis): Remove this. |
|
3096 '-Wno-implicit-conversion-floating-point-to-bool', |
|
3097 ], |
|
3098 }], |
|
3099 ['clang==1 and clang_use_chrome_plugins==1', { |
|
3100 'OTHER_CFLAGS': [ |
|
3101 '<@(clang_chrome_plugins_flags)', |
|
3102 ], |
|
3103 }], |
|
3104 ['clang==1 and clang_load!=""', { |
|
3105 'OTHER_CFLAGS': [ |
|
3106 '-Xclang', '-load', '-Xclang', '<(clang_load)', |
|
3107 ], |
|
3108 }], |
|
3109 ['clang==1 and clang_add_plugin!=""', { |
|
3110 'OTHER_CFLAGS': [ |
|
3111 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
|
3112 ], |
|
3113 }], |
|
3114 ['clang==1 and "<(GENERATOR)"=="ninja"', { |
|
3115 'OTHER_CFLAGS': [ |
|
3116 # See http://crbug.com/110262 |
|
3117 '-fcolor-diagnostics', |
|
3118 ], |
|
3119 }], |
|
3120 ], |
|
3121 }, |
|
3122 'conditions': [ |
|
3123 ['clang==1', { |
|
3124 'variables': { |
|
3125 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', |
|
3126 }, |
|
3127 }], |
|
3128 ['asan==1', { |
|
3129 'xcode_settings': { |
|
3130 'OTHER_CFLAGS': [ |
|
3131 '-faddress-sanitizer', |
|
3132 ], |
|
3133 }, |
|
3134 'defines': [ |
|
3135 'ADDRESS_SANITIZER', |
|
3136 ], |
|
3137 }], |
|
3138 ], |
|
3139 'target_conditions': [ |
|
3140 ['_type!="static_library"', { |
|
3141 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
|
3142 'conditions': [ |
|
3143 ['asan==1', { |
|
3144 'xcode_settings': { |
|
3145 'OTHER_LDFLAGS': [ |
|
3146 '-faddress-sanitizer', |
|
3147 ], |
|
3148 }, |
|
3149 }], |
|
3150 ], |
|
3151 }], |
|
3152 ['_mac_bundle', { |
|
3153 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
|
3154 }], |
|
3155 ['_type=="executable"', { |
|
3156 'postbuilds': [ |
|
3157 { |
|
3158 # Arranges for data (heap) pages to be protected against |
|
3159 # code execution when running on Mac OS X 10.7 ("Lion"), and |
|
3160 # ensures that the position-independent executable (PIE) bit |
|
3161 # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). |
|
3162 'variables': { |
|
3163 # Define change_mach_o_flags in a variable ending in _path |
|
3164 # so that GYP understands it's a path and performs proper |
|
3165 # relativization during dict merging. |
|
3166 'change_mach_o_flags': |
|
3167 'mac/change_mach_o_flags_from_xcode.sh', |
|
3168 'change_mach_o_flags_options%': [ |
|
3169 ], |
|
3170 'target_conditions': [ |
|
3171 ['mac_pie==0 or release_valgrind_build==1', { |
|
3172 # Don't enable PIE if it's unwanted. It's unwanted if |
|
3173 # the target specifies mac_pie=0 or if building for |
|
3174 # Valgrind, because Valgrind doesn't understand slide. |
|
3175 # See the similar mac_pie/release_valgrind_build check |
|
3176 # below. |
|
3177 'change_mach_o_flags_options': [ |
|
3178 '--no-pie', |
|
3179 ], |
|
3180 }], |
|
3181 ], |
|
3182 }, |
|
3183 'postbuild_name': 'Change Mach-O Flags', |
|
3184 'action': [ |
|
3185 '$(srcdir)$(os_sep)build$(os_sep)<(change_mach_o_flags)', |
|
3186 '>@(change_mach_o_flags_options)', |
|
3187 ], |
|
3188 }, |
|
3189 ], |
|
3190 'conditions': [ |
|
3191 ['asan==1', { |
|
3192 'variables': { |
|
3193 'asan_saves_file': 'asan.saves', |
|
3194 }, |
|
3195 'xcode_settings': { |
|
3196 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)', |
|
3197 }, |
|
3198 }], |
|
3199 ], |
|
3200 'target_conditions': [ |
|
3201 ['mac_pie==1 and release_valgrind_build==0', { |
|
3202 # Turn on position-independence (ASLR) for executables. When |
|
3203 # PIE is on for the Chrome executables, the framework will |
|
3204 # also be subject to ASLR. |
|
3205 # Don't do this when building for Valgrind, because Valgrind |
|
3206 # doesn't understand slide. TODO: Make Valgrind on Mac OS X |
|
3207 # understand slide, and get rid of the Valgrind check. |
|
3208 'xcode_settings': { |
|
3209 'OTHER_LDFLAGS': [ |
|
3210 '-Wl,-pie', # Position-independent executable (MH_PIE) |
|
3211 ], |
|
3212 }, |
|
3213 }], |
|
3214 ], |
|
3215 }], |
|
3216 ['(_type=="executable" or _type=="shared_library" or \ |
|
3217 _type=="loadable_module") and mac_strip!=0', { |
|
3218 'target_conditions': [ |
|
3219 ['mac_real_dsym == 1', { |
|
3220 # To get a real .dSYM bundle produced by dsymutil, set the |
|
3221 # debug information format to dwarf-with-dsym. Since |
|
3222 # strip_from_xcode will not be used, set Xcode to do the |
|
3223 # stripping as well. |
|
3224 'configurations': { |
|
3225 'Release_Base': { |
|
3226 'xcode_settings': { |
|
3227 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
|
3228 'DEPLOYMENT_POSTPROCESSING': 'YES', |
|
3229 'STRIP_INSTALLED_PRODUCT': 'YES', |
|
3230 'target_conditions': [ |
|
3231 ['_type=="shared_library" or _type=="loadable_module"', { |
|
3232 # The Xcode default is to strip debugging symbols |
|
3233 # only (-S). Local symbols should be stripped as |
|
3234 # well, which will be handled by -x. Xcode will |
|
3235 # continue to insert -S when stripping even when |
|
3236 # additional flags are added with STRIPFLAGS. |
|
3237 'STRIPFLAGS': '-x', |
|
3238 }], # _type=="shared_library" or _type=="loadable_module"' |
|
3239 ], # target_conditions |
|
3240 }, # xcode_settings |
|
3241 }, # configuration "Release" |
|
3242 }, # configurations |
|
3243 }, { # mac_real_dsym != 1 |
|
3244 # To get a fast fake .dSYM bundle, use a post-build step to |
|
3245 # produce the .dSYM and strip the executable. strip_from_xcode |
|
3246 # only operates in the Release configuration. |
|
3247 'postbuilds': [ |
|
3248 { |
|
3249 'variables': { |
|
3250 # Define strip_from_xcode in a variable ending in _path |
|
3251 # so that gyp understands it's a path and performs proper |
|
3252 # relativization during dict merging. |
|
3253 'strip_from_xcode': 'mac/strip_from_xcode', |
|
3254 }, |
|
3255 'postbuild_name': 'Strip If Needed', |
|
3256 'action': ['$(srcdir)$(os_sep)build$(os_sep)<(strip_from_xcode)'], |
|
3257 }, |
|
3258 ], # postbuilds |
|
3259 }], # mac_real_dsym |
|
3260 ], # target_conditions |
|
3261 }], # (_type=="executable" or _type=="shared_library" or |
|
3262 # _type=="loadable_module") and mac_strip!=0 |
|
3263 ], # target_conditions |
|
3264 }, # target_defaults |
|
3265 }], # OS=="mac" |
|
3266 ['OS=="ios"', { |
|
3267 'target_defaults': { |
|
3268 'xcode_settings' : { |
|
3269 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
|
3270 |
|
3271 # This next block is mostly common with the 'mac' section above, |
|
3272 # but keying off (or setting) 'clang' isn't valid for iOS as it |
|
3273 # also seems to mean using the custom build of clang. |
|
3274 |
|
3275 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default |
|
3276 # when buliding with clang. This warning is triggered when the |
|
3277 # override keyword is used via the OVERRIDE macro from |
|
3278 # base/compiler_specific.h. |
|
3279 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', |
|
3280 'WARNING_CFLAGS': [ |
|
3281 '-Wheader-hygiene', |
|
3282 # Don't die on dtoa code that uses a char as an array index. |
|
3283 # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
|
3284 '-Wno-char-subscripts', |
|
3285 # Clang spots more unused functions. |
|
3286 '-Wno-unused-function', |
|
3287 # See comments on this flag higher up in this file. |
|
3288 '-Wno-unnamed-type-template-args', |
|
3289 # This (rightyfully) complains about 'override', which we use |
|
3290 # heavily. |
|
3291 '-Wno-c++11-extensions', |
|
3292 ], |
|
3293 }, |
|
3294 'target_conditions': [ |
|
3295 ['_type=="executable"', { |
|
3296 'configurations': { |
|
3297 'Release_Base': { |
|
3298 'xcode_settings': { |
|
3299 'DEPLOYMENT_POSTPROCESSING': 'YES', |
|
3300 'STRIP_INSTALLED_PRODUCT': 'YES', |
|
3301 }, |
|
3302 }, |
|
3303 }, |
|
3304 'xcode_settings': { |
|
3305 'conditions': [ |
|
3306 ['chromium_ios_signing', { |
|
3307 # iOS SDK wants everything for device signed. |
|
3308 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', |
|
3309 }, { |
|
3310 'CODE_SIGNING_REQUIRED': 'NO', |
|
3311 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', |
|
3312 }], |
|
3313 ], |
|
3314 }, |
|
3315 }], |
|
3316 ], # target_conditions |
|
3317 }, # target_defaults |
|
3318 }], # OS=="ios" |
|
3319 ['OS=="win"', { |
|
3320 'target_defaults': { |
|
3321 'defines': [ |
|
3322 '_WIN32_WINNT=0x0602', |
|
3323 'WINVER=0x0602', |
|
3324 'WIN32', |
|
3325 '_WINDOWS', |
|
3326 'NOMINMAX', |
|
3327 'PSAPI_VERSION=1', |
|
3328 '_CRT_RAND_S', |
|
3329 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', |
|
3330 'WIN32_LEAN_AND_MEAN', |
|
3331 '_ATL_NO_OPENGL', |
|
3332 ], |
|
3333 'conditions': [ |
|
3334 ['buildtype=="Official"', { |
|
3335 # In official builds, targets can self-select an optimization |
|
3336 # level by defining a variable named 'optimize', and setting it |
|
3337 # to one of |
|
3338 # - "size", optimizes for minimal code size - the default. |
|
3339 # - "speed", optimizes for speed over code size. |
|
3340 # - "max", whole program optimization and link-time code |
|
3341 # generation. This is very expensive and should be used |
|
3342 # sparingly. |
|
3343 'variables': { |
|
3344 'optimize%': 'size', |
|
3345 }, |
|
3346 'target_conditions': [ |
|
3347 ['optimize=="size"', { |
|
3348 'msvs_settings': { |
|
3349 'VCCLCompilerTool': { |
|
3350 # 1, optimizeMinSpace, Minimize Size (/O1) |
|
3351 'Optimization': '1', |
|
3352 # 2, favorSize - Favor small code (/Os) |
|
3353 'FavorSizeOrSpeed': '2', |
|
3354 }, |
|
3355 }, |
|
3356 }, |
|
3357 ], |
|
3358 ['optimize=="speed"', { |
|
3359 'msvs_settings': { |
|
3360 'VCCLCompilerTool': { |
|
3361 # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
|
3362 'Optimization': '2', |
|
3363 # 1, favorSpeed - Favor fast code (/Ot) |
|
3364 'FavorSizeOrSpeed': '1', |
|
3365 }, |
|
3366 }, |
|
3367 }, |
|
3368 ], |
|
3369 ['optimize=="max"', { |
|
3370 'msvs_settings': { |
|
3371 'VCCLCompilerTool': { |
|
3372 # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
|
3373 'Optimization': '2', |
|
3374 # 1, favorSpeed - Favor fast code (/Ot) |
|
3375 'FavorSizeOrSpeed': '1', |
|
3376 # This implies link time code generation. |
|
3377 'WholeProgramOptimization': 'true', |
|
3378 }, |
|
3379 }, |
|
3380 }, |
|
3381 ], |
|
3382 ], |
|
3383 }, |
|
3384 ], |
|
3385 ['component=="static_library"', { |
|
3386 'defines': [ |
|
3387 '_HAS_EXCEPTIONS=0', |
|
3388 ], |
|
3389 }], |
|
3390 ['MSVS_VERSION=="2008"', { |
|
3391 'defines': [ |
|
3392 '_HAS_TR1=0', |
|
3393 ], |
|
3394 }], |
|
3395 ['secure_atl', { |
|
3396 'defines': [ |
|
3397 '_SECURE_ATL', |
|
3398 ], |
|
3399 }], |
|
3400 ], |
|
3401 'msvs_system_include_dirs': [ |
|
3402 '<(windows_sdk_path)/Include/shared', |
|
3403 '<(windows_sdk_path)/Include/um', |
|
3404 '<(windows_sdk_path)/Include/winrt', |
|
3405 '<(directx_sdk_path)/Include', |
|
3406 '$(VSInstallDir)/VC/atlmfc/include', |
|
3407 ], |
|
3408 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'], |
|
3409 'msvs_disabled_warnings': [4351, 4396, 4503, 4819, |
|
3410 # TODO(maruel): These warnings are level 4. They will be slowly |
|
3411 # removed as code is fixed. |
|
3412 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245, |
|
3413 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, |
|
3414 4702, 4706, |
|
3415 ], |
|
3416 'msvs_settings': { |
|
3417 'VCCLCompilerTool': { |
|
3418 'AdditionalOptions': ['/MP'], |
|
3419 'MinimalRebuild': 'false', |
|
3420 'BufferSecurityCheck': 'true', |
|
3421 'EnableFunctionLevelLinking': 'true', |
|
3422 'RuntimeTypeInfo': 'false', |
|
3423 'WarningLevel': '4', |
|
3424 'WarnAsError': 'true', |
|
3425 'DebugInformationFormat': '3', |
|
3426 'conditions': [ |
|
3427 ['component=="shared_library"', { |
|
3428 'ExceptionHandling': '1', # /EHsc |
|
3429 }, { |
|
3430 'ExceptionHandling': '0', |
|
3431 }], |
|
3432 ], |
|
3433 }, |
|
3434 'VCLibrarianTool': { |
|
3435 'AdditionalOptions': ['/ignore:4221'], |
|
3436 'AdditionalLibraryDirectories': [ |
|
3437 '<(directx_sdk_path)/Lib/x86', |
|
3438 '<(windows_sdk_path)/Lib/win8/um/x86', |
|
3439 ], |
|
3440 }, |
|
3441 'VCLinkerTool': { |
|
3442 'AdditionalDependencies': [ |
|
3443 'wininet.lib', |
|
3444 'dnsapi.lib', |
|
3445 'version.lib', |
|
3446 'msimg32.lib', |
|
3447 'ws2_32.lib', |
|
3448 'usp10.lib', |
|
3449 'psapi.lib', |
|
3450 'dbghelp.lib', |
|
3451 'winmm.lib', |
|
3452 'shlwapi.lib', |
|
3453 ], |
|
3454 |
|
3455 'conditions': [ |
|
3456 ['msvs_express', { |
|
3457 # Explicitly required when using the ATL with express |
|
3458 'AdditionalDependencies': [ |
|
3459 'atlthunk.lib', |
|
3460 ], |
|
3461 |
|
3462 # ATL 8.0 included in WDK 7.1 makes the linker to generate |
|
3463 # almost eight hundred LNK4254 and LNK4078 warnings: |
|
3464 # - warning LNK4254: section 'ATL' (50000040) merged into |
|
3465 # '.rdata' (40000040) with different attributes |
|
3466 # - warning LNK4078: multiple 'ATL' sections found with |
|
3467 # different attributes |
|
3468 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'], |
|
3469 }], |
|
3470 ['MSVS_VERSION=="2005e"', { |
|
3471 # Non-express versions link automatically to these |
|
3472 'AdditionalDependencies': [ |
|
3473 'advapi32.lib', |
|
3474 'comdlg32.lib', |
|
3475 'ole32.lib', |
|
3476 'shell32.lib', |
|
3477 'user32.lib', |
|
3478 'winspool.lib', |
|
3479 ], |
|
3480 }], |
|
3481 ], |
|
3482 'AdditionalLibraryDirectories': [ |
|
3483 '<(directx_sdk_path)/Lib/x86', |
|
3484 '<(windows_sdk_path)/Lib/win8/um/x86', |
|
3485 ], |
|
3486 'GenerateDebugInformation': 'true', |
|
3487 'MapFileName': '$(OutDir)\\$(TargetName).map', |
|
3488 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', |
|
3489 'FixedBaseAddress': '1', |
|
3490 # SubSystem values: |
|
3491 # 0 == not set |
|
3492 # 1 == /SUBSYSTEM:CONSOLE |
|
3493 # 2 == /SUBSYSTEM:WINDOWS |
|
3494 # Most of the executables we'll ever create are tests |
|
3495 # and utilities with console output. |
|
3496 'SubSystem': '1', |
|
3497 }, |
|
3498 'VCMIDLTool': { |
|
3499 'GenerateStublessProxies': 'true', |
|
3500 'TypeLibraryName': '$(InputName).tlb', |
|
3501 'OutputDirectory': '$(IntDir)', |
|
3502 'HeaderFileName': '$(InputName).h', |
|
3503 'DLLDataFileName': '$(InputName).dlldata.c', |
|
3504 'InterfaceIdentifierFileName': '$(InputName)_i.c', |
|
3505 'ProxyFileName': '$(InputName)_p.c', |
|
3506 }, |
|
3507 'VCResourceCompilerTool': { |
|
3508 'Culture' : '1033', |
|
3509 'AdditionalIncludeDirectories': [ |
|
3510 '<(DEPTH)', |
|
3511 '<(SHARED_INTERMEDIATE_DIR)', |
|
3512 ], |
|
3513 }, |
|
3514 }, |
|
3515 }, |
|
3516 }], |
|
3517 ['disable_nacl==1', { |
|
3518 'target_defaults': { |
|
3519 'defines': [ |
|
3520 'DISABLE_NACL', |
|
3521 ], |
|
3522 }, |
|
3523 }], |
|
3524 ['OS=="win" and msvs_use_common_linker_extras', { |
|
3525 'target_defaults': { |
|
3526 'msvs_settings': { |
|
3527 'VCLinkerTool': { |
|
3528 'DelayLoadDLLs': [ |
|
3529 'dbghelp.dll', |
|
3530 'dwmapi.dll', |
|
3531 'shell32.dll', |
|
3532 'uxtheme.dll', |
|
3533 ], |
|
3534 }, |
|
3535 }, |
|
3536 'configurations': { |
|
3537 'x86_Base': { |
|
3538 'msvs_settings': { |
|
3539 'VCLinkerTool': { |
|
3540 'AdditionalOptions': [ |
|
3541 '/safeseh', |
|
3542 '/dynamicbase', |
|
3543 '/ignore:4199', |
|
3544 '/ignore:4221', |
|
3545 '/nxcompat', |
|
3546 ], |
|
3547 }, |
|
3548 }, |
|
3549 }, |
|
3550 'x64_Base': { |
|
3551 'msvs_settings': { |
|
3552 'VCLinkerTool': { |
|
3553 'AdditionalOptions': [ |
|
3554 # safeseh is not compatible with x64 |
|
3555 '/dynamicbase', |
|
3556 '/ignore:4199', |
|
3557 '/ignore:4221', |
|
3558 '/nxcompat', |
|
3559 ], |
|
3560 }, |
|
3561 }, |
|
3562 }, |
|
3563 }, |
|
3564 }, |
|
3565 }], |
|
3566 ['enable_new_npdevice_api==1', { |
|
3567 'target_defaults': { |
|
3568 'defines': [ |
|
3569 'ENABLE_NEW_NPDEVICE_API', |
|
3570 ], |
|
3571 }, |
|
3572 }], |
|
3573 ['clang==1', { |
|
3574 'conditions': [ |
|
3575 ['OS=="android"', { |
|
3576 # Android could use the goma with clang. |
|
3577 'make_global_settings': [ |
|
3578 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'], |
|
3579 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'], |
|
3580 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'], |
|
3581 ['CC.host', '$(CC)'], |
|
3582 ['CXX.host', '$(CXX)'], |
|
3583 ['LINK.host', '$(LINK)'], |
|
3584 ], |
|
3585 }, { |
|
3586 'make_global_settings': [ |
|
3587 ['CC', '<(make_clang_dir)/bin/clang'], |
|
3588 ['CXX', '<(make_clang_dir)/bin/clang++'], |
|
3589 ['LINK', '$(CXX)'], |
|
3590 ['CC.host', '$(CC)'], |
|
3591 ['CXX.host', '$(CXX)'], |
|
3592 ['LINK.host', '$(LINK)'], |
|
3593 ], |
|
3594 }], |
|
3595 ], |
|
3596 }], |
|
3597 ['OS=="android" and clang==0', { |
|
3598 # Hardcode the compiler names in the Makefile so that |
|
3599 # it won't depend on the environment at make time. |
|
3600 'make_global_settings': [ |
|
3601 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'], |
|
3602 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'], |
|
3603 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'], |
|
3604 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'], |
|
3605 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'], |
|
3606 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'], |
|
3607 ], |
|
3608 }], |
|
3609 ], |
|
3610 'xcode_settings': { |
|
3611 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
|
3612 # This block adds *project-wide* configuration settings to each project |
|
3613 # file. It's almost always wrong to put things here. Specify your |
|
3614 # custom xcode_settings in target_defaults to add them to targets instead. |
|
3615 |
|
3616 'conditions': [ |
|
3617 # In an Xcode Project Info window, the "Base SDK for All Configurations" |
|
3618 # setting sets the SDK on a project-wide basis. In order to get the |
|
3619 # configured SDK to show properly in the Xcode UI, SDKROOT must be set |
|
3620 # here at the project level. |
|
3621 ['OS=="mac"', { |
|
3622 'conditions': [ |
|
3623 ['mac_sdk_path==""', { |
|
3624 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
|
3625 }, { |
|
3626 'SDKROOT': '<(mac_sdk_path)', # -isysroot |
|
3627 }], |
|
3628 ], |
|
3629 }], |
|
3630 ['OS=="ios"', { |
|
3631 'conditions': [ |
|
3632 ['ios_sdk_path==""', { |
|
3633 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot |
|
3634 }, { |
|
3635 'SDKROOT': '<(ios_sdk_path)', # -isysroot |
|
3636 }], |
|
3637 ], |
|
3638 }], |
|
3639 ['OS=="ios"', { |
|
3640 # Just build armv7 since iOS 4.3+ only supports armv7. |
|
3641 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)', |
|
3642 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)', |
|
3643 # Target both iPhone and iPad. |
|
3644 'TARGETED_DEVICE_FAMILY': '1,2', |
|
3645 }], |
|
3646 ], |
|
3647 |
|
3648 # The Xcode generator will look for an xcode_settings section at the root |
|
3649 # of each dict and use it to apply settings on a file-wide basis. Most |
|
3650 # settings should not be here, they should be in target-specific |
|
3651 # xcode_settings sections, or better yet, should use non-Xcode-specific |
|
3652 # settings in target dicts. SYMROOT is a special case, because many other |
|
3653 # Xcode variables depend on it, including variables such as |
|
3654 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
|
3655 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
|
3656 # files to appear (when present) in the UI as actual files and not red |
|
3657 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
|
3658 # and therefore SYMROOT, needs to be set at the project level. |
|
3659 'SYMROOT': '<(DEPTH)/xcodebuild', |
|
3660 }, |
|
3661 } |