Disable Convolver.SIMDVerification under the ThreadSanitizer.
[chromium-blink-merge.git] / chrome / chrome.gyp
blob18493f8869a02723d6e170b69a67dd9658cd8ccb
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.
5   'variables': {
6     'chromium_code': 1,
8     # Define the common dependencies that contain all the actual
9     # Chromium functionality.  This list gets pulled in below by
10     # the link of the actual chrome (or chromium) executable on
11     # Linux or Mac, and into chrome.dll on Windows.
12     # NOTE: Most new includes should go in the OS!="ios" condition below.
13     'chromium_browser_dependencies': [
14       'common',
15       'browser',
16       '../sync/sync.gyp:sync',
17     ],
18     'chromium_child_dependencies': [
19       'common',
20       '../sync/sync.gyp:sync',
21     ],
22     'allocator_target': '../base/allocator/allocator.gyp:allocator',
23     'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
24     'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
25     'repack_locales_cmd': ['python', 'tools/build/repack_locales.py'],
26     # TODO: remove this helper when we have loops in GYP
27     'apply_locales_cmd': ['python', '<(DEPTH)/build/apply_locales.py'],
28     'conditions': [
29       ['OS!="ios"', {
30         'chromium_browser_dependencies': [
31           '../printing/printing.gyp:printing',
32           '../ppapi/ppapi_internal.gyp:ppapi_host',
33         ],
34         'chromium_child_dependencies': [
35           'debugger',
36           'plugin',
37           'renderer',
38           'utility',
39           '../content/content.gyp:content_gpu',
40           '../content/content.gyp:content_ppapi_plugin',
41           '../content/content.gyp:content_worker',
42           '../third_party/WebKit/Source/devtools/devtools.gyp:devtools_frontend_resources',
43         ],
44       }],
45       ['OS=="win"', {
46         'platform_locale_settings_grd':
47             'app/resources/locale_settings_win.grd',
48       },],
49       ['OS!="android" and OS!="ios"', {
50         'chromium_browser_dependencies': [
51           # Android doesn't use the service process (only needed for print).
52           'service',
53         ],
54       }],
55       ['OS=="linux"', {
56         'conditions': [
57           ['chromeos==1', {
58             'conditions': [
59               ['branding=="Chrome"', {
60                 'platform_locale_settings_grd':
61                     'app/resources/locale_settings_google_chromeos.grd',
62               }, {  # branding!=Chrome
63                 'platform_locale_settings_grd':
64                     'app/resources/locale_settings_chromiumos.grd',
65               }],
66             ]
67           }, {  # chromeos==0
68             'platform_locale_settings_grd':
69                 'app/resources/locale_settings_linux.grd',
70           }],
71         ],
72       },],
73       ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
74         'platform_locale_settings_grd':
75             'app/resources/locale_settings_linux.grd',
76       },],
77       ['OS=="mac"', {
78         'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
79         'platform_locale_settings_grd':
80             'app/resources/locale_settings_mac.grd',
81         'conditions': [
82           ['branding=="Chrome"', {
83             'mac_bundle_id': 'com.google.Chrome',
84             'mac_creator': 'rimZ',
85             # The policy .grd file also needs the bundle id.
86             'grit_defines': ['-D', 'mac_bundle_id=com.google.Chrome'],
87           }, {  # else: branding!="Chrome"
88             'mac_bundle_id': 'org.chromium.Chromium',
89             'mac_creator': 'Cr24',
90             # The policy .grd file also needs the bundle id.
91             'grit_defines': ['-D', 'mac_bundle_id=org.chromium.Chromium'],
92           }],  # branding
93         ],  # conditions
94       }],  # OS=="mac"
95     ],  # conditions
96   },  # variables
97   'includes': [
98     # Place some targets in gypi files to reduce contention on this file.
99     # By using an include, we keep everything in a single xcodeproj file.
100     # Note on Win64 targets: targets that end with win64 be used
101     # on 64-bit Windows only. Targets that end with nacl_win64 should be used
102     # by Native Client only.
103     # NOTE: Most new includes should go in the OS!="ios" condition below.
104     '../build/win_precompile.gypi',
105     'chrome_browser.gypi',
106     'chrome_browser_ui.gypi',
107     'chrome_common.gypi',
108     'chrome_installer_util.gypi',
109     'chrome_tests_unit.gypi',
110     'version.gypi',
111     '../components/nacl/nacl_defines.gypi',
112   ],
113   'conditions': [
114     ['OS!="ios"', {
115       'includes': [
116         'app/policy/policy_templates.gypi',
117         'chrome_browser_extensions.gypi',
118         'chrome_dll.gypi',
119         'chrome_exe.gypi',
120         'chrome_installer.gypi',
121         'chrome_renderer.gypi',
122         'chrome_tests.gypi',
123         'nacl.gypi',
124         '../apps/apps.gypi',
125       ],
126       'targets': [
127         {
128           'target_name': 'default_extensions',
129           'type': 'none',
130           'conditions': [
131             ['OS=="win"', {
132               'copies': [
133                 {
134                   'destination': '<(PRODUCT_DIR)/extensions',
135                   'files': [
136                     'browser/extensions/default_extensions/external_extensions.json'
137                   ]
138                 }
139               ],
140             }],
141             ['OS=="linux" and chromeos==1 and branding=="Chrome"', {
142               'copies': [
143                 {
144                   'destination': '<(PRODUCT_DIR)',
145                   'files': [
146                     'browser/extensions/default_extensions/chromeos/extensions/'
147                   ]
148                 }
149               ],
150             }],
151           ],
152         },
153         {
154           'target_name': 'debugger',
155           'type': 'static_library',
156           'variables': { 'enable_wexit_time_destructors': 1, },
157           'dependencies': [
158             'chrome_resources.gyp:chrome_extra_resources',
159             'chrome_resources.gyp:chrome_resources',
160             'chrome_resources.gyp:chrome_strings',
161             'chrome_resources.gyp:theme_resources',
162             'common/extensions/api/api.gyp:api',
163             '../base/base.gyp:base',
164             '../content/content.gyp:content_browser',
165             '../net/net.gyp:http_server',
166             '../net/net.gyp:net',
167             '../skia/skia.gyp:skia',
168             '../third_party/icu/icu.gyp:icui18n',
169             '../third_party/icu/icu.gyp:icuuc',
170             '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
171             '../third_party/libusb/libusb.gyp:libusb',
172           ],
173           'include_dirs': [
174             '..',
175           ],
176           'sources': [
177             'browser/devtools/adb/android_rsa.cc',
178             'browser/devtools/adb/android_rsa.h',
179             'browser/devtools/adb/android_usb_device.cc',
180             'browser/devtools/adb/android_usb_device.h',
181             'browser/devtools/adb/android_usb_socket.cc',
182             'browser/devtools/adb/android_usb_socket.h',
183             'browser/devtools/adb_client_socket.cc',
184             'browser/devtools/adb_client_socket.h',
185             'browser/devtools/adb_web_socket.cc',
186             'browser/devtools/adb_web_socket.h',
187             'browser/devtools/browser_list_tabcontents_provider.cc',
188             'browser/devtools/browser_list_tabcontents_provider.h',
189             'browser/devtools/devtools_adb_bridge.cc',
190             'browser/devtools/devtools_adb_bridge.h',
191             'browser/devtools/devtools_file_helper.cc',
192             'browser/devtools/devtools_file_helper.h',
193             'browser/devtools/devtools_file_system_indexer.cc',
194             'browser/devtools/devtools_file_system_indexer.h',
195             'browser/devtools/devtools_toggle_action.h',
196             'browser/devtools/devtools_window.cc',
197             'browser/devtools/devtools_window.h',
198             'browser/devtools/remote_debugging_server.cc',
199             'browser/devtools/remote_debugging_server.h',
200             'browser/devtools/tethering_adb_filter.cc',
201             'browser/devtools/tethering_adb_filter.h',
202           ],
203           'conditions': [
204             ['toolkit_uses_gtk == 1', {
205               'dependencies': [
206                 '../build/linux/system.gyp:gtk',
207               ],
208             }],
209             ['OS=="android"', {
210               'dependencies!': [
211                 '../third_party/libusb/libusb.gyp:libusb',
212               ],
213               'sources!': [
214                 'browser/devtools/browser_list_tabcontents_provider.cc',
215                 'browser/devtools/devtools_window.cc',
216                 'browser/devtools/remote_debugging_server.cc',
217               ],
218             }],
219             ['debug_devtools==1', {
220               'defines': [
221                 'DEBUG_DEVTOOLS=1',
222                ],
223             }],
224           ],
225           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
226           'msvs_disabled_warnings': [ 4267, ],
227         },
228         {
229           'target_name': 'plugin',
230           'type': 'static_library',
231           'variables': { 'enable_wexit_time_destructors': 1, },
232           'dependencies': [
233             'chrome_resources.gyp:chrome_strings',
234             '../base/base.gyp:base',
235             '../content/content.gyp:content_plugin',
236           ],
237           'sources': [
238             'plugin/chrome_content_plugin_client.cc',
239             'plugin/chrome_content_plugin_client.h',
240           ],
241           'include_dirs': [
242             '..',
243             '<(grit_out_dir)',
244           ],
245         },
246         {
247           'target_name': 'utility',
248           'type': 'static_library',
249           'variables': { 'enable_wexit_time_destructors': 1, },
250           'dependencies': [
251             '../base/base.gyp:base',
252             '../content/content.gyp:content_utility',
253             '../skia/skia.gyp:skia',
254             '../third_party/libxml/libxml.gyp:libxml',
255             'common',
256             '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
257             '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
258           ],
259           'sources': [
260             'utility/chrome_content_utility_client.cc',
261             'utility/chrome_content_utility_client.h',
262             'utility/extensions/unpacker.cc',
263             'utility/extensions/unpacker.h',
264             'utility/importer/bookmark_html_reader.cc',
265             'utility/importer/bookmark_html_reader.h',
266             'utility/importer/bookmarks_file_importer.cc',
267             'utility/importer/bookmarks_file_importer.h',
268             'utility/importer/external_process_importer_bridge.cc',
269             'utility/importer/external_process_importer_bridge.h',
270             'utility/importer/favicon_reencode.cc',
271             'utility/importer/favicon_reencode.h',
272             'utility/importer/firefox_importer.cc',
273             'utility/importer/firefox_importer.h',
274             'utility/importer/firefox_importer_unittest_messages_internal.h',
275             'utility/importer/firefox_importer_unittest_utils.h',
276             'utility/importer/firefox_importer_unittest_utils_mac.cc',
277             'utility/importer/ie_importer_win.cc',
278             'utility/importer/ie_importer_win.h',
279             'utility/importer/importer.cc',
280             'utility/importer/importer.h',
281             'utility/importer/importer_creator.cc',
282             'utility/importer/importer_creator.h',
283             'utility/importer/nss_decryptor.cc',
284             'utility/importer/nss_decryptor.h',
285             'utility/importer/nss_decryptor_mac.h',
286             'utility/importer/nss_decryptor_mac.mm',
287             'utility/importer/nss_decryptor_win.cc',
288             'utility/importer/nss_decryptor_win.h',
289             'utility/importer/safari_importer.h',
290             'utility/importer/safari_importer.mm',
291             'utility/media_galleries/itunes_pref_parser_win.cc',
292             'utility/media_galleries/itunes_pref_parser_win.h',
293             'utility/profile_import_handler.cc',
294             'utility/profile_import_handler.h',
295             'utility/utility_message_handler.h',
296             'utility/web_resource_unpacker.cc',
297             'utility/web_resource_unpacker.h',
298           ],
299           'include_dirs': [
300             '..',
301             '<(grit_out_dir)',
302           ],
303           'conditions': [
304             ['toolkit_uses_gtk == 1', {
305               'dependencies': [
306                 '../build/linux/system.gyp:gtk',
307               ],
308             }],
309             ['OS=="win" or OS=="mac"', {
310               'sources': [
311                 'utility/media_galleries/itunes_library_parser.cc',
312                 'utility/media_galleries/itunes_library_parser.h',
313                 'utility/media_galleries/picasa_album_table_reader.cc',
314                 'utility/media_galleries/picasa_album_table_reader.h',
315                 'utility/media_galleries/picasa_albums_indexer.cc',
316                 'utility/media_galleries/picasa_albums_indexer.h',
317                 'utility/media_galleries/pmp_column_reader.cc',
318                 'utility/media_galleries/pmp_column_reader.h',
319               ],
320             }],
321             ['use_openssl==1', {
322               'sources!': [
323                 'utility/importer/nss_decryptor.cc',
324               ]
325             }],
326             ['OS!="win" and OS!="mac" and use_openssl==0', {
327               'dependencies': [
328                 '../crypto/crypto.gyp:crypto',
329               ],
330               'sources': [
331                 'utility/importer/nss_decryptor_system_nss.cc',
332                 'utility/importer/nss_decryptor_system_nss.h',
333               ],
334             }],
335             ['OS=="android"', {
336               'sources/': [
337                 ['exclude', '^utility/importer/'],
338                 ['exclude', '^utility/profile_import_handler\.cc'],
339               ],
340             }],
341             ['enable_mdns == 1', {
342               'sources': [
343                 'utility/local_discovery/service_discovery_client_impl.cc',
344                 'utility/local_discovery/service_discovery_client_impl.h',
345                 'utility/local_discovery/service_discovery_message_handler.cc',
346                 'utility/local_discovery/service_discovery_message_handler.h',
347               ]
348             }],
349           ],
350           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
351           'msvs_disabled_warnings': [ 4267, ],
352         },
353         {
354           'target_name': 'service',
355           'type': 'static_library',
356           'variables': { 'enable_wexit_time_destructors': 1, },
357           'dependencies': [
358             'chrome_resources.gyp:chrome_strings',
359             'common',
360             'common_net',
361             '../base/base.gyp:base',
362             '../google_apis/google_apis.gyp:google_apis',
363             '../jingle/jingle.gyp:notifier',
364             '../net/net.gyp:net',
365             '../printing/printing.gyp:printing',
366             '../skia/skia.gyp:skia',
367             '../third_party/libjingle/libjingle.gyp:libjingle',
368           ],
369           'sources': [
370             'service/chrome_service_application_mac.h',
371             'service/chrome_service_application_mac.mm',
372             'service/service_ipc_server.cc',
373             'service/service_ipc_server.h',
374             'service/service_main.cc',
375             'service/service_process.cc',
376             'service/service_process.h',
377             'service/service_process_prefs.cc',
378             'service/service_process_prefs.h',
379             'service/service_utility_process_host.cc',
380             'service/service_utility_process_host.h',
381             'service/cloud_print/cloud_print_auth.cc',
382             'service/cloud_print/cloud_print_auth.h',
383             'service/cloud_print/cloud_print_connector.cc',
384             'service/cloud_print/cloud_print_connector.h',
385             'service/cloud_print/cloud_print_helpers.cc',
386             'service/cloud_print/cloud_print_helpers.h',
387             'service/cloud_print/cloud_print_proxy.cc',
388             'service/cloud_print/cloud_print_proxy.h',
389             'service/cloud_print/cloud_print_proxy_backend.cc',
390             'service/cloud_print/cloud_print_proxy_backend.h',
391             'service/cloud_print/cloud_print_token_store.cc',
392             'service/cloud_print/cloud_print_token_store.h',
393             'service/cloud_print/cloud_print_url_fetcher.cc',
394             'service/cloud_print/cloud_print_url_fetcher.h',
395             'service/cloud_print/cloud_print_wipeout.cc',
396             'service/cloud_print/cloud_print_wipeout.h',
397             'service/cloud_print/connector_settings.cc',
398             'service/cloud_print/connector_settings.h',
399             'service/cloud_print/job_status_updater.cc',
400             'service/cloud_print/job_status_updater.h',
401             'service/cloud_print/print_system_dummy.cc',
402             'service/cloud_print/print_system.cc',
403             'service/cloud_print/print_system.h',
404             'service/cloud_print/printer_job_handler.cc',
405             'service/cloud_print/printer_job_handler.h',
406             'service/cloud_print/printer_job_queue_handler.cc',
407             'service/cloud_print/printer_job_queue_handler.h',
408             'service/net/service_url_request_context.cc',
409             'service/net/service_url_request_context.h',
410           ],
411           'include_dirs': [
412             '..',
413           ],
414           'conditions': [
415             ['OS=="win"', {
416               'defines': [
417                 # CP_PRINT_SYSTEM_AVAILABLE disables default dummy implementation
418                 # of cloud print system, and allows to use custom implementaiton.
419                 'CP_PRINT_SYSTEM_AVAILABLE',
420               ],
421               'sources': [
422                 'service/cloud_print/print_system_win.cc',
423               ],
424             }],
425             ['toolkit_uses_gtk == 1', {
426               'dependencies': [
427                 '../build/linux/system.gyp:gtk',
428               ],
429             }],
430             ['use_cups==1', {
431               'dependencies': [
432                 '../printing/printing.gyp:cups',
433               ],
434               'defines': [
435                 # CP_PRINT_SYSTEM_AVAILABLE disables default dummy implementation
436                 # of cloud print system, and allows to use custom implementaiton.
437                 'CP_PRINT_SYSTEM_AVAILABLE',
438               ],
439               'sources': [
440                 'service/cloud_print/print_system_cups.cc',
441               ],
442             }],
443           ],
444         },
445         {
446           'target_name': 'ipclist',
447           'type': 'executable',
448           'variables': { 'enable_wexit_time_destructors': 1, },
449           'dependencies': [
450             'test_support_common',
451             '../skia/skia.gyp:skia',
452             '../sync/sync.gyp:sync',
453           ],
454           'include_dirs': [
455              '..',
456           ],
457           'sources': [
458             'tools/ipclist/ipclist.cc',
459           ],
460         },
461       ],
462     }],  # OS!="ios"
463     ['OS=="mac"',
464       { 'targets': [
465         {
466           'target_name': 'helper_app',
467           'type': 'executable',
468           'variables': { 'enable_wexit_time_destructors': 1, },
469           'product_name': '<(mac_product_name) Helper',
470           'mac_bundle': 1,
471           'dependencies': [
472             'chrome_dll',
473             'infoplist_strings_tool',
474           ],
475           'sources': [
476             # chrome_exe_main_mac.cc's main() is the entry point for
477             # the "chrome" (browser app) target.  All it does is jump
478             # to chrome_dll's ChromeMain.  This is appropriate for
479             # helper processes too, because the logic to discriminate
480             # between process types at run time is actually directed
481             # by the --type command line argument processed by
482             # ChromeMain.  Sharing chrome_exe_main_mac.cc with the
483             # browser app will suffice for now.
484             'app/chrome_exe_main_mac.cc',
485             'app/helper-Info.plist',
486           ],
487           # TODO(mark): Come up with a fancier way to do this.  It should only
488           # be necessary to list helper-Info.plist once, not the three times it
489           # is listed here.
490           'mac_bundle_resources!': [
491             'app/helper-Info.plist',
492           ],
493           # TODO(mark): For now, don't put any resources into this app.  Its
494           # resources directory will be a symbolic link to the browser app's
495           # resources directory.
496           'mac_bundle_resources/': [
497             ['exclude', '.*'],
498           ],
499           'xcode_settings': {
500             'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
501             'CHROMIUM_SHORT_NAME': '<(branding)',
502             'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
503             'INFOPLIST_FILE': 'app/helper-Info.plist',
504           },
505           'postbuilds': [
506             {
507               # The helper doesn't have real localizations, it just has
508               # empty .lproj directories, which is enough to convince Cocoa
509               # that anything running out of the helper .app supports those
510               # languages.
511               'postbuild_name': 'Make Empty Localizations',
512               'variables': {
513                 'locale_dirs': [
514                   '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
515                 ],
516               },
517               'action': [
518                 'tools/build/mac/make_locale_dirs.sh',
519                 '<@(locale_dirs)',
520               ],
521             },
522             {
523               # The framework (chrome_dll) defines its load-time path
524               # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
525               # (chrome).  A different relative path needs to be used in
526               # helper_app.
527               'postbuild_name': 'Fix Framework Link',
528               'action': [
529                 'install_name_tool',
530                 '-change',
531                 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
532                 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
533                 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
534               ],
535             },
536             {
537               # Modify the Info.plist as needed.  The script explains why this
538               # is needed.  This is also done in the chrome and chrome_dll
539               # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
540               # are used because Breakpad, Keystone, and SCM keys are
541               # never placed into the helper.
542               'postbuild_name': 'Tweak Info.plist',
543               'action': ['<(tweak_info_plist_path)',
544                          '--breakpad=0',
545                          '--keystone=0',
546                          '--scm=0'],
547             },
548             {
549               # Make sure there isn't any Objective-C in the helper app's
550               # executable.
551               'postbuild_name': 'Verify No Objective-C',
552               'action': [
553                 '../build/mac/verify_no_objc.sh',
554               ],
555             },
556           ],
557           'conditions': [
558             ['mac_breakpad==1', {
559               'variables': {
560                 # A real .dSYM is needed for dump_syms to operate on.
561                 'mac_real_dsym': 1,
562               },
563               'xcode_settings': {
564                 # With mac_real_dsym set, strip_from_xcode won't be used.
565                 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
566                 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
567               },
568             }],
569             ['asan==1', {
570               'xcode_settings': {
571                 # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
572                 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
573               },
574             }],
575             ['component=="shared_library"', {
576               'xcode_settings': {
577                 'LD_RUNPATH_SEARCH_PATHS': [
578                   # Get back from Chromium.app/Contents/Versions/V/
579                   #                                    Helper.app/Contents/MacOS
580                   '@loader_path/../../../../../../..',
581                 ],
582               },
583             }],
584           ],
585         },  # target helper_app
586         {
587           # A library containing the actual code for the app mode app, shared
588           # by unit tests.
589           'target_name': 'app_mode_app_support',
590           'type': 'static_library',
591           'variables': { 'enable_wexit_time_destructors': 1, },
592           'product_name': 'app_mode_app_support',
593           'dependencies': [
594             '../base/base.gyp:base',
595             'common_constants.gyp:common_constants',
596           ],
597           'sources': [
598             'common/mac/app_mode_chrome_locator.h',
599             'common/mac/app_mode_chrome_locator.mm',
600             'common/mac/app_mode_common.h',
601             'common/mac/app_mode_common.mm',
602           ],
603           'include_dirs': [
604             '..',
605           ],
606         },  # target app_mode_app_support
607         {
608           # This produces the template for app mode loader bundles. It's a
609           # template in the sense that parts of it need to be "filled in" by
610           # Chrome before it can be executed.
611           'target_name': 'app_mode_app',
612           'type': 'executable',
613           'mac_bundle' : 1,
614           'variables': { 'enable_wexit_time_destructors': 1, },
615           'product_name': 'app_mode_loader',
616           'dependencies': [
617             'app_mode_app_support',
618             'infoplist_strings_tool',
619           ],
620           'sources': [
621             'app/app_mode_loader_mac.mm',
622             'app/app_mode-Info.plist',
623           ],
624           'include_dirs': [
625             '..',
626           ],
627           'link_settings': {
628             'libraries': [
629               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
630               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
631             ],
632           },
633           'mac_bundle_resources!': [
634             'app/app_mode-Info.plist',
635           ],
636           'mac_bundle_resources/': [
637             ['exclude', '.*'],
638           ],
639           'xcode_settings': {
640             'INFOPLIST_FILE': 'app/app_mode-Info.plist',
641             'APP_MODE_APP_BUNDLE_ID': '<(mac_bundle_id).app.@APP_MODE_SHORTCUT_ID@',
642           },
643           'postbuilds' : [
644             {
645               # Modify the Info.plist as needed.  The script explains why this
646               # is needed.  This is also done in the chrome and chrome_dll
647               # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
648               # are used because Breakpad, Keystone, and SCM keys are
649               # never placed into the app mode loader.
650               'postbuild_name': 'Tweak Info.plist',
651               'action': ['<(tweak_info_plist_path)',
652                          '--breakpad=0',
653                          '--keystone=0',
654                          '--scm=0'],
655             },
656           ],
657         },  # target app_mode_app
658         {
659           # Convenience target to build a disk image.
660           'target_name': 'build_app_dmg',
661           # Don't place this in the 'all' list; most won't want it.
662           # In GYP, booleans are 0/1, not True/False.
663           'suppress_wildcard': 1,
664           'type': 'none',
665           'dependencies': [
666             'chrome',
667           ],
668           'variables': {
669             'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
670             'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
672             'conditions': [
673               # This duplicates the output path from build_app_dmg.
674               ['branding=="Chrome"', {
675                 'dmg_name': 'GoogleChrome.dmg',
676               }, { # else: branding!="Chrome"
677                 'dmg_name': 'Chromium.dmg',
678               }],
679             ],
680           },
681           'actions': [
682             {
683               'inputs': [
684                 '<(build_app_dmg_script_path)',
685                 '<(pkg_dmg_script_path)',
686                 '<(PRODUCT_DIR)/<(mac_product_name).app',
687               ],
688               'outputs': [
689                 '<(PRODUCT_DIR)/<(dmg_name)',
690               ],
691               'action_name': 'build_app_dmg',
692               'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
693             },
694           ],  # 'actions'
695         },
696         {
697           # Dummy target to allow chrome to require plugin_carbon_interpose to
698           # build without actually linking to the resulting library.
699           'target_name': 'interpose_dependency_shim',
700           'type': 'executable',
701           'variables': { 'enable_wexit_time_destructors': 1, },
702           'dependencies': [
703             'plugin_carbon_interpose',
704           ],
705           # In release, we end up with a strip step that is unhappy if there is
706           # no binary. Rather than check in a new file for this temporary hack,
707           # just generate a source file on the fly.
708           'actions': [
709             {
710               'action_name': 'generate_stub_main',
711               'process_outputs_as_sources': 1,
712               'inputs': [],
713               'outputs': [ '<(INTERMEDIATE_DIR)/dummy_main.c' ],
714               'action': [
715                 'bash', '-c',
716                 'echo "int main() { return 0; }" > <(INTERMEDIATE_DIR)/dummy_main.c'
717               ],
718             },
719           ],
720         },
721         {
722           # dylib for interposing Carbon calls in the plugin process.
723           'target_name': 'plugin_carbon_interpose',
724           'type': 'shared_library',
725           'variables': { 'enable_wexit_time_destructors': 1, },
726           # This target must not depend on static libraries, else the code in
727           # those libraries would appear twice in plugin processes: Once from
728           # Chromium Framework, and once from this dylib.
729           'dependencies': [
730             'chrome_dll',
731           ],
732           'conditions': [
733             ['component=="shared_library"', {
734               'dependencies': [
735                 '../webkit/support/webkit_support.gyp:glue',
736                 '../content/content.gyp:content_plugin',
737               ],
738               'xcode_settings': {
739                 'LD_RUNPATH_SEARCH_PATHS': [
740                   # Get back from Chromium.app/Contents/Versions/V
741                   '@loader_path/../../../..',
742                 ],
743               },
744             }],
745           ],
746           'sources': [
747             '../content/plugin/plugin_carbon_interpose_mac.cc',
748           ],
749           'include_dirs': [
750             '..',
751           ],
752           'link_settings': {
753             'libraries': [
754               '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
755             ],
756           },
757           'xcode_settings': {
758             'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)',
759             'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
760             'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..',
761           },
762           'postbuilds': [
763             {
764               # The framework (chrome_dll) defines its load-time path
765               # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
766               # (chrome).  A different relative path needs to be used in
767               # plugin_carbon_interpose, which runs in the helper_app.
768               'postbuild_name': 'Fix Framework Link',
769               'action': [
770                 'install_name_tool',
771                 '-change',
772                 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
773                 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
774                 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
775               ],
776             },
777           ],
778         },
779         {
780           'target_name': 'infoplist_strings_tool',
781           'type': 'executable',
782           'variables': { 'enable_wexit_time_destructors': 1, },
783           'dependencies': [
784             'chrome_resources.gyp:chrome_strings',
785             '../base/base.gyp:base',
786             '../ui/ui.gyp:ui',
787           ],
788           'include_dirs': [
789             '<(grit_out_dir)',
790           ],
791           'sources': [
792             'tools/mac_helpers/infoplist_strings_util.mm',
793           ],
794         },
795       ],  # targets
796     }],  # OS=="mac"
797     ['OS!="mac" and OS!="ios"', {
798       'targets': [
799         {
800           'target_name': 'convert_dict',
801           'type': 'executable',
802           'variables': { 'enable_wexit_time_destructors': 1, },
803           'dependencies': [
804             '../base/base.gyp:base',
805             '../base/base.gyp:base_i18n',
806             'convert_dict_lib',
807             '../third_party/hunspell/hunspell.gyp:hunspell',
808           ],
809           'sources': [
810             'tools/convert_dict/convert_dict.cc',
811           ],
812         },
813         {
814           'target_name': 'convert_dict_lib',
815           'product_name': 'convert_dict',
816           'type': 'static_library',
817           'variables': { 'enable_wexit_time_destructors': 1, },
818           'include_dirs': [
819             '..',
820           ],
821           'dependencies': [
822             '../base/base.gyp:base',
823           ],
824           'sources': [
825             'tools/convert_dict/aff_reader.cc',
826             'tools/convert_dict/aff_reader.h',
827             'tools/convert_dict/dic_reader.cc',
828             'tools/convert_dict/dic_reader.h',
829             'tools/convert_dict/hunspell_reader.cc',
830             'tools/convert_dict/hunspell_reader.h',
831           ],
832         },
833         {
834           'target_name': 'flush_cache',
835           'type': 'executable',
836           'dependencies': [
837             '../base/base.gyp:base',
838             '../base/base.gyp:test_support_base',
839           ],
840           'sources': [
841             'tools/perf/flush_cache/flush_cache.cc',
842           ],
843         },
844       ],
845     }],  # OS!="mac" and OS!="ios"
846     ['OS=="linux"',
847       { 'targets': [
848         {
849           'target_name': 'linux_symbols',
850           'type': 'none',
851           'conditions': [
852             ['linux_dump_symbols==1', {
853               'actions': [
854                 {
855                   'action_name': 'dump_symbols',
856                   'inputs': [
857                     '<(DEPTH)/build/linux/dump_app_syms',
858                     '<(PRODUCT_DIR)/dump_syms',
859                     '<(PRODUCT_DIR)/chrome',
860                   ],
861                   'outputs': [
862                     '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
863                   ],
864                   'action': ['<(DEPTH)/build/linux/dump_app_syms',
865                              '<(PRODUCT_DIR)/dump_syms',
866                              '<(linux_strip_binary)',
867                              '<(PRODUCT_DIR)/chrome',
868                              '<@(_outputs)'],
869                   'message': 'Dumping breakpad symbols to <(_outputs)',
870                   'process_outputs_as_sources': 1,
871                 },
872               ],
873               'dependencies': [
874                 'chrome',
875                 '../breakpad/breakpad.gyp:dump_syms',
876               ],
877             }],
878             ['linux_strip_reliability_tests==1', {
879               'actions': [
880                 {
881                   'action_name': 'strip_reliability_tests',
882                   'inputs': [
883                     '<(PRODUCT_DIR)/automated_ui_tests',
884                     '<(PRODUCT_DIR)/reliability_tests',
885                     '<(PRODUCT_DIR)/_pyautolib.so',
886                   ],
887                   'outputs': [
888                     '<(PRODUCT_DIR)/strip_reliability_tests.stamp',
889                   ],
890                   'action': ['strip',
891                              '-g',
892                              '<@(_inputs)'],
893                   'message': 'Stripping reliability tests',
894                 },
895               ],
896               'dependencies': [
897                 'automated_ui_tests',
898                 'reliability_tests',
899               ],
900             }],
901           ],
902         },
903         {
904           'target_name': 'ipcfuzz',
905           'type': 'loadable_module',
906           'include_dirs': [
907             '..',
908           ],
909           'dependencies': [
910             'test_support_common',
911             '../skia/skia.gyp:skia',
912           ],
913           'sources': [
914             'tools/ipclist/ipcfuzz.cc',
915           ],
916         },
917       ],
918     }],  # OS=="linux"
919     ['OS=="win"',
920       { 'targets': [
921         {
922           # For historical reasons, chrome/chrome.sln has been the entry point
923           # for new Chrome developers. To assist development, include several
924           # core unittests that are otherwise only accessible side-by-side with
925           # chrome via all/all.sln.
926           'target_name': 'test_targets',
927           'type': 'none',
928           'dependencies': [
929             '../base/base.gyp:base_unittests',
930             '../chrome_frame/chrome_frame.gyp:chrome_frame_tests',
931             '../chrome_frame/chrome_frame.gyp:chrome_frame_net_tests',
932             '../content/content.gyp:content_browsertests',
933             '../content/content.gyp:content_shell',
934             '../content/content.gyp:content_unittests',
935             '../net/net.gyp:net_unittests',
936             '../ui/ui.gyp:ui_unittests',
937           ],
938           'conditions': [
939             ['use_aura==1 or target_arch=="x64"', {
940               'dependencies!': [
941                 '../chrome_frame/chrome_frame.gyp:chrome_frame_tests',
942                 '../chrome_frame/chrome_frame.gyp:chrome_frame_net_tests',
943               ],
944             }],
945           ],
946         },
947         {
948           'target_name': 'chrome_version_resources',
949           'type': 'none',
950           'conditions': [
951             ['branding == "Chrome"', {
952               'variables': {
953                  'branding_path': 'app/theme/google_chrome/BRANDING',
954               },
955             }, { # else branding!="Chrome"
956               'variables': {
957                  'branding_path': 'app/theme/chromium/BRANDING',
958               },
959             }],
960           ],
961           'variables': {
962             'output_dir': 'chrome_version',
963             'template_input_path': 'app/chrome_version.rc.version',
964           },
965           'direct_dependent_settings': {
966             'include_dirs': [
967               '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
968             ],
969           },
970           'sources': [
971             'app/app_host_exe.ver',
972             'app/chrome_exe.ver',
973             'app/chrome_dll.ver',
974             'app/nacl64_exe.ver',
975             'app/other.ver',
976           ],
977           'includes': [
978             'version_resource_rules.gypi',
979           ],
980         },
981         {
982           'target_name': 'chrome_version_header',
983           'type': 'none',
984           'hard_dependency': 1,
985           'actions': [
986             {
987               'action_name': 'version_header',
988               'variables': {
989                 'lastchange_path':
990                   '<(DEPTH)/build/util/LASTCHANGE',
991               },
992               'conditions': [
993                 ['branding == "Chrome"', {
994                   'variables': {
995                      'branding_path': 'app/theme/google_chrome/BRANDING',
996                   },
997                 }, { # else branding!="Chrome"
998                   'variables': {
999                      'branding_path': 'app/theme/chromium/BRANDING',
1000                   },
1001                 }],
1002               ],
1003               'inputs': [
1004                 '<(version_path)',
1005                 '<(branding_path)',
1006                 '<(lastchange_path)',
1007                 'version.h.in',
1008               ],
1009               'outputs': [
1010                 '<(SHARED_INTERMEDIATE_DIR)/version.h',
1011               ],
1012               'action': [
1013                 'python',
1014                 '<(version_py_path)',
1015                 '-f', '<(version_path)',
1016                 '-f', '<(branding_path)',
1017                 '-f', '<(lastchange_path)',
1018                 'version.h.in',
1019                 '<@(_outputs)',
1020               ],
1021               'message': 'Generating version header file: <@(_outputs)',
1022             },
1023           ],
1024         },
1025         {
1026           'target_name': 'automation',
1027           'type': 'static_library',
1028           'dependencies': [
1029             'chrome_resources.gyp:theme_resources',
1030             '../skia/skia.gyp:skia',
1031           ],
1032           'include_dirs': [
1033             '..',
1034           ],
1035           'sources': [
1036              'test/automation/automation_handle_tracker.cc',
1037              'test/automation/automation_handle_tracker.h',
1038              'test/automation/automation_json_requests.cc',
1039              'test/automation/automation_json_requests.h',
1040              'test/automation/automation_proxy.cc',
1041              'test/automation/automation_proxy.h',
1042              'test/automation/browser_proxy.cc',
1043              'test/automation/browser_proxy.h',
1044              'test/automation/tab_proxy.cc',
1045              'test/automation/tab_proxy.h',
1046              'test/automation/value_conversion_traits.cc',
1047              'test/automation/value_conversion_traits.h',
1048              'test/automation/value_conversion_util.h',
1049              'test/automation/window_proxy.cc',
1050              'test/automation/window_proxy.h',
1051           ],
1052         },
1053         {
1054           'target_name': 'crash_service',
1055           'type': 'executable',
1056           'dependencies': [
1057             'installer_util',
1058             '../base/base.gyp:base',
1059             '../breakpad/breakpad.gyp:breakpad_handler',
1060             '../breakpad/breakpad.gyp:breakpad_sender',
1061             '../chrome/common_constants.gyp:common_constants',
1062           ],
1063           'include_dirs': [
1064             '..',
1065           ],
1066           'sources': [
1067             'tools/crash_service/crash_service.cc',
1068             'tools/crash_service/crash_service.h',
1069             'tools/crash_service/main.cc',
1070           ],
1071           'msvs_settings': {
1072             'VCLinkerTool': {
1073               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
1074             },
1075           },
1076         },
1077         {
1078           'target_name': 'sb_sigutil',
1079           'type': 'executable',
1080           'dependencies': [
1081             '../base/base.gyp:base',
1082             'safe_browsing_proto',
1083           ],
1084           'sources': [
1085             'browser/safe_browsing/signature_util.h',
1086             'browser/safe_browsing/signature_util_win.cc',
1087             'tools/safe_browsing/sb_sigutil.cc',
1088           ],
1089         },
1090       ],  # 'targets'
1091       'includes': [
1092         'chrome_process_finder.gypi',
1093         'metro_utils.gypi',
1094       ],
1095     }],  # OS=="win"
1096     ['OS=="win" and target_arch=="ia32"',
1097       { 'targets': [
1098         {
1099           'target_name': 'chrome_user32_delay_imports',
1100           'type': 'none',
1101           'variables': {
1102             'lib_dir': '<(INTERMEDIATE_DIR)',
1103           },
1104           'sources': [
1105               'chrome.user32.delay.imports'
1106           ],
1107           'includes': [
1108               '../build/win/importlibs/create_import_lib.gypi',
1109           ],
1110           'direct_dependent_settings': {
1111             'msvs_settings': {
1112               'VCLinkerTool': {
1113                 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
1114                 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
1115               },
1116             },
1117           },
1118         },
1119         {
1120           'target_name': 'crash_service_win64',
1121           'type': 'executable',
1122           'product_name': 'crash_service64',
1123           'dependencies': [
1124             'installer_util_nacl_win64',
1125             '../base/base.gyp:base_static_win64',
1126             '../breakpad/breakpad.gyp:breakpad_handler_win64',
1127             '../breakpad/breakpad.gyp:breakpad_sender_win64',
1128             '../chrome/common_constants.gyp:common_constants_win64',
1129           ],
1130           'include_dirs': [
1131             '..',
1132           ],
1133           'sources': [
1134             'tools/crash_service/crash_service.cc',
1135             'tools/crash_service/crash_service.h',
1136             'tools/crash_service/main.cc',
1137             '../content/public/common/content_switches.cc',
1138           ],
1139           'defines': [
1140             'COMPILE_CONTENT_STATICALLY',
1141           ],
1142           'msvs_settings': {
1143             'VCLinkerTool': {
1144               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
1145             },
1146           },
1147           'configurations': {
1148             'Common_Base': {
1149               'msvs_target_platform': 'x64',
1150             },
1151           },
1152         },
1153       ]},  # 'targets'
1154     ],  # OS=="win" and target_arch=="ia32"
1155     ['chromeos==1', {
1156       'includes': [ 'chrome_browser_chromeos.gypi' ],
1157     }],  # chromeos==1
1158     ['OS=="android"',
1159       {
1160       'targets': [
1161         {
1162           'target_name': 'chrome_java',
1163           'type': 'none',
1164           'dependencies': [
1165             'chrome_resources.gyp:chrome_strings',
1166             'profile_sync_service_model_type_selection_java',
1167             'resource_id_java',
1168             'toolbar_model_security_levels_java',
1169             '../base/base.gyp:base',
1170             '../components/components.gyp:autofill_java',
1171             '../components/components.gyp:navigation_interception_java',
1172             '../components/components.gyp:sessions',
1173             '../components/components.gyp:web_contents_delegate_android_java',
1174             '../content/content.gyp:content_java',
1175             '../sync/sync.gyp:sync_java',
1176             '../third_party/guava/guava.gyp:guava_javalib',
1177             '../ui/ui.gyp:ui_java',
1178           ],
1179           'variables': {
1180             'java_in_dir': '../chrome/android/java',
1181             'has_java_resources': 1,
1182             'R_package': 'org.chromium.chrome',
1183             'R_package_relpath': 'org/chromium/chrome',
1184             'java_strings_grd': 'android_chrome_strings.grd',
1185             # Include xml string files generated from generated_resources.grd
1186             'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
1187             'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
1188           },
1189           'includes': [
1190             '../build/java.gypi',
1191           ],
1192         },
1193       ], # 'targets'
1194       'includes': [
1195         'chrome_android.gypi',
1196       ]}, # 'includes'
1197     ],  # OS=="android"
1198     ['configuration_policy==1 and OS!="android"', {
1199       'includes': [ 'policy.gypi', ],
1200     }],
1201   ],  # 'conditions'