Disable AutomationApiTest.Mixin on Windows due to flakiness
[chromium-blink-merge.git] / chrome / chrome_dll.gypi
blob29d91f67079e6c1708cd4019746928b04f8008b1
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   'conditions': [
6     ['OS=="mac" or OS=="win"', {
7       'targets': [
8         {
9           'target_name': 'chrome_dll',
10           'type': 'none',
11           'dependencies': [
12             'chrome_main_dll',
13           ],
14           'conditions': [
15             ['OS=="mac" and component=="shared_library"', {
16               'type': 'shared_library',
17               'includes': [ 'chrome_dll_bundle.gypi' ],
18               'xcode_settings': {
19                 'OTHER_LDFLAGS': [
20                   '-Wl,-reexport_library,<(PRODUCT_DIR)/libchrome_main_dll.dylib',
21                 ],
22               },
23             }],  # OS=="mac"
24             ['chrome_multiple_dll==1', {
25               'dependencies': [
26                 'chrome_child_dll',
27               ],
28             }],
29             ['incremental_chrome_dll==1', {
30               # Linking to a different directory and then hardlinking back
31               # to OutDir is a workaround to avoid having the .ilk for
32               # chrome.exe and chrome.dll conflicting. See crbug.com/92528
33               # for more information. Done on the dll instead of the exe so
34               # that people launching from VS don't need to modify
35               # $(TargetPath) for the exe.
36               'actions': [
37                 {
38                   'action_name': 'hardlink_to_output',
39                   'inputs': [
40                     '$(OutDir)\\initial\\chrome.dll',
41                   ],
42                   'outputs': [
43                     '$(OutDir)\\chrome.dll',
44                   ],
45                   'action': ['tools\\build\\win\\hardlink_failsafe.bat',
46                              '$(OutDir)\\initial\\chrome.dll',
47                              '$(OutDir)\\chrome.dll'],
48                 },
49               ],
50               'conditions': [
51                 # Only hardlink pdb if we're generating debug info.
52                 ['fastbuild==0 or win_z7!=0', {
53                   'actions': [
54                     {
55                       'action_name': 'hardlink_pdb_to_output',
56                       'inputs': [
57                         # Not the pdb, since gyp doesn't know about it
58                         '$(OutDir)\\initial\\chrome.dll',
59                       ],
60                       'outputs': [
61                         '$(OutDir)\\chrome.dll.pdb',
62                       ],
63                       'action': ['tools\\build\\win\\hardlink_failsafe.bat',
64                                  '$(OutDir)\\initial\\chrome.dll.pdb',
65                                  '$(OutDir)\\chrome.dll.pdb'],
66                     }
67                   ]
68                 }]
69               ],
70             }],
71           ]
72         },
73         {
74           # GN version: //chrome:main_dll
75           'target_name': 'chrome_main_dll',
76           'type': 'shared_library',
77           'variables': {
78             'enable_wexit_time_destructors': 1,
79           },
80           'sources': [
81             '../base/win/dllmain.cc',
82             'app/chrome_command_ids.h',
83             'app/chrome_dll_resource.h',
84             'app/chrome_main.cc',
85             'app/chrome_main_delegate.cc',
86             'app/chrome_main_delegate.h',
87             'app/chrome_main_mac.h',
88             'app/chrome_main_mac.mm',
89             'app/close_handle_hook_win.cc',
90             'app/close_handle_hook_win.h',
91             'app/delay_load_hook_win.cc',
92             'app/delay_load_hook_win.h',
93           ],
94           'dependencies': [
95             '<@(chromium_browser_dependencies)',
96             '../content/content.gyp:content_app_browser',
97           ],
98           'conditions': [
99             ['OS=="win"', {
100               'dependencies': [
101                 '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf',
102               ],
103             }],
104             ['OS=="win" and configuration_policy==1', {
105               'dependencies': [
106                 '<(DEPTH)/components/components.gyp:policy',
107               ],
108             }],
109             ['use_aura==1', {
110               'dependencies': [
111                 '../ui/compositor/compositor.gyp:compositor',
112               ],
113             }],
114             ['OS=="win" and target_arch=="ia32"', {
115               # Add a dependency to custom import library for user32 delay
116               # imports only in x86 builds.
117               'dependencies': [
118                 'chrome_user32_delay_imports',
119               ],
120             },],
121             ['OS=="win"', {
122               'product_name': 'chrome',
123               'dependencies': [
124                 # On Windows, link the dependencies (libraries) that make
125                 # up actual Chromium functionality into this .dll.
126                 'chrome_version_resources',
127                 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
128                 '../content/app/resources/content_resources.gyp:content_resources',
129                 '../crypto/crypto.gyp:crypto',
130                 '../net/net.gyp:net_resources',
131                 '../ui/views/views.gyp:views',
132               ],
133               'sources': [
134                 'app/chrome_dll.rc',
136                 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
138                 # Cursors.
139                 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc',
140               ],
141               'include_dirs': [
142                 '<(DEPTH)/third_party/wtl/include',
143               ],
144               'configurations': {
145                 'Debug_Base': {
146                   'msvs_settings': {
147                     'VCLinkerTool': {
148                       'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
149                     },
150                   },
151                 },
152               },
153               'msvs_settings': {
154                 'VCLinkerTool': {
155                   'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
156                   # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
157                   'SubSystem': '2',
158                   'conditions': [
159                     ['incremental_chrome_dll==1', {
160                       'OutputFile': '$(OutDir)\\initial\\chrome.dll',
161                       'UseLibraryDependencyInputs': "true",
162                     }],
163                     ['target_arch=="ia32"', {
164                       # Don't set an x64 base address (to avoid breaking HE-ASLR).
165                       'BaseAddress': '0x01c30000',
166                       # Link against the XP-constrained user32 import library
167                       # instead of the platform-SDK provided one to avoid
168                       # inadvertently taking dependencies on post-XP user32
169                       # exports.
170                       'AdditionalDependencies!': [
171                         'user32.lib',
172                       ],
173                       'IgnoreDefaultLibraryNames': [
174                         'user32.lib',
175                       ],
176                       # Remove user32 delay load for chrome.dll.
177                       'DelayLoadDLLs!': [
178                         'user32.dll',
179                       ],
180                       'AdditionalDependencies': [
181                         'user32.winxp.lib',
182                       ],
183                       'DelayLoadDLLs': [
184                         'user32-delay.dll',
185                       ],
186                       'AdditionalLibraryDirectories': [
187                         '<(DEPTH)/build/win/importlibs/x86',
188                       ],
189                       'ForceSymbolReferences': [
190                         # Force the inclusion of the delay load hook in this
191                         # binary.
192                         '_ChromeDelayLoadHook@8',
193                       ],
194                     }],
195                   ],
196                   'DelayLoadDLLs': [
197                     'comdlg32.dll',
198                     'crypt32.dll',
199                     'cryptui.dll',
200                     'dhcpcsvc.dll',
201                     'imagehlp.dll',
202                     'imm32.dll',
203                     'iphlpapi.dll',
204                     'setupapi.dll',
205                     'urlmon.dll',
206                     'winhttp.dll',
207                     'wininet.dll',
208                     'winspool.drv',
209                     'ws2_32.dll',
210                     'wsock32.dll',
211                   ],
212                 },
213                 'VCManifestTool': {
214                   'AdditionalManifestFiles': [
215                     '$(ProjectDir)\\app\\chrome.dll.manifest',
216                   ],
217                 },
218               },
219               'conditions': [
220                 ['win_use_allocator_shim==1', {
221                   'dependencies': [
222                     '<(allocator_target)',
223                   ],
224                 }],
225                 ['enable_basic_printing==1 or enable_print_preview==1', {
226                   'dependencies': [
227                     '../printing/printing.gyp:printing',
228                   ],
229                 }],
230                 ['chrome_pgo_phase==1', {
231                   'msvs_settings': {
232                     'VCLinkerTool': {
233                       'LinkTimeCodeGeneration': '2',
234                     },
235                   },
236                 }],
237                 ['chrome_pgo_phase==2', {
238                   'msvs_settings': {
239                     'VCLinkerTool': {
240                       'LinkTimeCodeGeneration': '3',
241                     },
242                   },
243                 }],
244               ]
245             }],
246             ['chrome_multiple_dll==1', {
247               'defines': [
248                 'CHROME_MULTIPLE_DLL_BROWSER',
249               ],
250             }, {
251               'dependencies': [
252                 '<@(chromium_child_dependencies)',
253                 '../content/content.gyp:content_app_both',
254               ],
255               'dependencies!': [
256                 '../content/content.gyp:content_app_browser',
257               ],
258             }],
259             ['chrome_multiple_dll==0 and enable_plugins==1', {
260               'dependencies': [
261                 '../pdf/pdf.gyp:pdf',
262               ],
263             }],
264             ['cld_version==1', {
265               'dependencies': [
266                 '<(DEPTH)/third_party/cld/cld.gyp:cld',
267               ],
268             }],
269             ['cld_version==0 or cld_version==2', {
270               'dependencies': [
271                 '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld_2',
272               ],
273             }],
274             ['OS=="mac" and component!="shared_library"', {
275               'includes': [ 'chrome_dll_bundle.gypi' ],
276             }],
277             ['OS=="mac" and component=="shared_library"', {
278               'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
279             }],
280             ['OS=="mac"', {
281               'dependencies': [
282                 '../components/components.gyp:crash_component',
283                 '../components/components.gyp:policy',
284               ],
285               'sources': [
286                 'app/chrome_crash_reporter_client.cc',
287                 'app/chrome_crash_reporter_client.h',
288                 'app/chrome_crash_reporter_client_mac.mm',
289               ],
290               'xcode_settings': {
291                 # Define the order of symbols within the framework.  This
292                 # sets -order_file.
293                 'ORDER_FILE': 'app/framework.order',
294               },
295               'include_dirs': [
296                 '<(grit_out_dir)',
297               ],
298             }],
299             # This step currently fails when using LTO. TODO(pcc): Re-enable.
300             ['OS=="mac" and use_lto==0', {
301               'postbuilds': [
302                 {
303                   # This step causes an error to be raised if the .order file
304                   # does not account for all global text symbols.  It
305                   # validates the completeness of the .order file.
306                   'postbuild_name': 'Verify global text symbol order',
307                   'variables': {
308                     'verify_order_path': 'tools/build/mac/verify_order',
309                   },
310                   'action': [
311                     '<(verify_order_path)',
312                     '_ChromeMain',
313                     '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
314                   ],
315                 },
316               ],
317             }],  # OS=="mac"
318           ],  # conditions
319         },  # target chrome_main_dll
320       ],  # targets
321     }],  # OS=="mac" or OS=="win"
322     ['chrome_multiple_dll', {
323       'targets': [
324         {
325           'target_name': 'chrome_child_dll',
326           'type': 'shared_library',
327           'product_name': 'chrome_child',
328           'variables': {
329             'enable_wexit_time_destructors': 1,
330           },
331           'dependencies': [
332             '<@(chromium_child_dependencies)',
333             '../content/content.gyp:content_app_child',
334             'chrome_version_resources',
335             'policy_path_parser',
336           ],
337           'defines': [
338             'CHROME_MULTIPLE_DLL_CHILD',
339           ],
340           'sources': [
341             '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
342             'app/chrome_main.cc',
343             'app/chrome_main_delegate.cc',
344             'app/chrome_main_delegate.h',
345             'app/close_handle_hook_win.cc',
346             'app/close_handle_hook_win.h',
347           ],
348           'conditions': [
349             ['OS=="win"', {
350               'dependencies': [
351                 '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf',
352               ],
353               'conditions': [
354                 ['chrome_pgo_phase==1', {
355                   'msvs_settings': {
356                     'VCLinkerTool': {
357                       'LinkTimeCodeGeneration': '2',
358                     },
359                   },
360                 }],
361                 ['chrome_pgo_phase==2', {
362                   'msvs_settings': {
363                     'VCLinkerTool': {
364                       'LinkTimeCodeGeneration': '3',
365                     },
366                   },
367                 }],
368               ]
369             }],
370             ['enable_plugins==1', {
371               'dependencies': [
372                 '../pdf/pdf.gyp:pdf',
373               ],
374             }],
375           ],
376         },  # target chrome_child_dll
377       ],
378     }],
379   ],