[safe browsing] Remove stale BINHASH code.
[chromium-blink-merge.git] / chrome / chrome_dll.gypi
blob13756e105d071a7e2c7d19b3a42a87dea3e1f791
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           'target_name': 'chrome_main_dll',
75           'type': 'shared_library',
76           'variables': {
77             'enable_wexit_time_destructors': 1,
78           },
79           'dependencies': [
80             '<@(chromium_browser_dependencies)',
81             '../components/components.gyp:policy',
82             '../content/content.gyp:content_app_browser',
83           ],
84           'conditions': [
85             ['OS=="win"', {
86               'dependencies': [
87                 '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf',
88               ],
89             }],
90             ['use_aura==1', {
91               'dependencies': [
92                 '../ui/compositor/compositor.gyp:compositor',
93               ],
94             }],
95             ['OS=="win" and target_arch=="ia32"', {
96               # Add a dependency to custom import library for user32 delay
97               # imports only in x86 builds.
98               'dependencies': [
99                 'chrome_user32_delay_imports',
100               ],
101             },],
102             ['OS=="win"', {
103               'product_name': 'chrome',
104               'dependencies': [
105                 # On Windows, link the dependencies (libraries) that make
106                 # up actual Chromium functionality into this .dll.
107                 'chrome_version_resources',
108                 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
109                 '../crypto/crypto.gyp:crypto',
110                 '../net/net.gyp:net_resources',
111                 '../ui/views/views.gyp:views',
112                 '../webkit/webkit_resources.gyp:webkit_resources',
113               ],
114               'sources': [
115                 'app/chrome_command_ids.h',
116                 'app/chrome_dll.rc',
117                 'app/chrome_dll_resource.h',
118                 'app/chrome_main.cc',
119                 'app/chrome_main_delegate.cc',
120                 'app/chrome_main_delegate.h',
121                 'app/delay_load_hook_win.cc',
122                 'app/delay_load_hook_win.h',
124                 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
125                 '../base/win/dllmain.cc',
127                 # Cursors.
128                 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
129               ],
130               'include_dirs': [
131                 '<(DEPTH)/third_party/wtl/include',
132               ],
133               'configurations': {
134                 'Debug_Base': {
135                   'msvs_settings': {
136                     'VCLinkerTool': {
137                       'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
138                     },
139                   },
140                 },
141               },
142               'msvs_settings': {
143                 'VCLinkerTool': {
144                   'BaseAddress': '0x01c30000',
145                   'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
146                   # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
147                   'SubSystem': '2',
148                   'conditions': [
149                     ['incremental_chrome_dll==1', {
150                       'OutputFile': '$(OutDir)\\initial\\chrome.dll',
151                       'UseLibraryDependencyInputs': "true",
152                     }],
153                     ['target_arch=="ia32"', {
154                       # Link against the XP-constrained user32 import library
155                       # instead of the platform-SDK provided one to avoid
156                       # inadvertently taking dependencies on post-XP user32
157                       # exports.
158                       'AdditionalDependencies!': [
159                         'user32.lib',
160                       ],
161                       'IgnoreDefaultLibraryNames': [
162                         'user32.lib',
163                       ],
164                       # Remove user32 delay load for chrome.dll.
165                       'DelayLoadDLLs!': [
166                         'user32.dll',
167                       ],
168                       'AdditionalDependencies': [
169                         'user32.winxp.lib',
170                       ],
171                       'DelayLoadDLLs': [
172                         'user32-delay.dll',
173                       ],
174                       'AdditionalLibraryDirectories': [
175                         '<(DEPTH)/build/win/importlibs/x86',
176                       ],
177                       'ForceSymbolReferences': [
178                         # Force the inclusion of the delay load hook in this
179                         # binary.
180                         '_ChromeDelayLoadHook@8',
181                       ],
182                     }],
183                   ],
184                   'DelayLoadDLLs': [
185                     'comdlg32.dll',
186                     'crypt32.dll',
187                     'cryptui.dll',
188                     'dhcpcsvc.dll',
189                     'imagehlp.dll',
190                     'imm32.dll',
191                     'iphlpapi.dll',
192                     'setupapi.dll',
193                     'urlmon.dll',
194                     'winhttp.dll',
195                     'wininet.dll',
196                     'winspool.drv',
197                     'ws2_32.dll',
198                     'wsock32.dll',
199                   ],
200                 },
201                 'VCManifestTool': {
202                   'AdditionalManifestFiles': [
203                     '$(ProjectDir)\\app\\chrome.dll.manifest',
204                   ],
205                 },
206               },
207               'conditions': [
208                 ['win_use_allocator_shim==1', {
209                   'dependencies': [
210                     '<(allocator_target)',
211                   ],
212                 }],
213                 ['enable_printing!=0', {
214                   'dependencies': [
215                     '../printing/printing.gyp:printing',
216                   ],
217                 }],
218                 ['component!="shared_library"', {  # http://crbug.com/339215
219                   'dependencies': [
220                     'chrome_dll_pdb_workaround',
221                    ],
222                 }],
223               ]
224             }],
225             ['chrome_multiple_dll==1', {
226               'defines': [
227                 'CHROME_MULTIPLE_DLL_BROWSER',
228               ],
229             }, {
230               'dependencies': [
231                 '<@(chromium_child_dependencies)',
232                 '../content/content.gyp:content_app_both',
233                 '../content/content.gyp:content_worker',
234               ],
235               'dependencies!': [
236                 '../content/content.gyp:content_app_browser',
237               ],
238             }],
239             ['cld_version==0 or cld_version==1', {
240               'dependencies': [
241                 '../third_party/cld/cld.gyp:cld',
242               ],
243             }],
244             ['cld_version==0 or cld_version==2', {
245               'dependencies': [
246                 '../third_party/cld_2/cld_2.gyp:cld_2',
247               ],
248             }],
249             ['OS=="mac" and component!="shared_library"', {
250               'includes': [ 'chrome_dll_bundle.gypi' ],
251             }],
252             ['OS=="mac" and component=="shared_library"', {
253               'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
254             }],
255             ['OS=="mac"', {
256               'xcode_settings': {
257                 # Define the order of symbols within the framework.  This
258                 # sets -order_file.
259                 'ORDER_FILE': 'app/framework.order',
260               },
261               'sources': [
262                 'app/chrome_command_ids.h',
263                 'app/chrome_dll_resource.h',
264                 'app/chrome_main.cc',
265                 'app/chrome_main_delegate.cc',
266                 'app/chrome_main_delegate.h',
267                 'app/chrome_main_mac.mm',
268                 'app/chrome_main_mac.h',
269               ],
270               'include_dirs': [
271                 '<(grit_out_dir)',
272               ],
273               'postbuilds': [
274                 {
275                   # This step causes an error to be raised if the .order file
276                   # does not account for all global text symbols.  It
277                   # validates the completeness of the .order file.
278                   'postbuild_name': 'Verify global text symbol order',
279                   'variables': {
280                     'verify_order_path': 'tools/build/mac/verify_order',
281                   },
282                   'action': [
283                     '<(verify_order_path)',
284                     '_ChromeMain',
285                     '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
286                   ],
287                 },
288               ],
289               'conditions': [
290                 ['mac_breakpad_compiled_in==1', {
291                   'dependencies': [
292                     '../breakpad/breakpad.gyp:breakpad',
293                     '../components/components.gyp:breakpad_component',
294                     '../components/components.gyp:policy',
295                   ],
296                   'sources': [
297                     'app/chrome_breakpad_client.cc',
298                     'app/chrome_breakpad_client.h',
299                     'app/chrome_breakpad_client_mac.mm',
300                   ],
301                 }, {  # else: mac_breakpad_compiled_in!=1
302                   # No Breakpad, put in the stubs.
303                   'dependencies': [
304                     '../components/components.gyp:breakpad_stubs',
305                   ],
306                 }],  # mac_breakpad_compiled_in
307                 ['internal_pdf', {
308                   'dependencies': [
309                     '../pdf/pdf.gyp:pdf',
310                   ],
311                 }],
312               ],  # conditions
313             }],  # OS=="mac"
314           ],  # conditions
315         },  # target chrome_main_dll
316       ],  # targets
317     }],  # OS=="mac" or OS=="win"
318     ['OS=="win"', {
319       'targets': [
320         {
321           # This target is only depended upon on Windows.
322           'target_name': 'chrome_dll_pdb_workaround',
323           'type': 'static_library',
324           'sources': [ 'empty_pdb_workaround.cc' ],
325           'conditions': [
326             ['fastbuild==0 or win_z7!=0', {
327              'msvs_settings': {
328               'VCCLCompilerTool': {
329                 # This *in the compile phase* must match the pdb name that's
330                 # output by the final link. See empty_pdb_workaround.cc for
331                 # more details.
332                 'DebugInformationFormat': '3',
333                 'ProgramDataBaseFileName': '<(PRODUCT_DIR)/chrome.dll.pdb',
334               },
335              },
336             }],
337           ],
338         },
339       ],
340     }],
341     ['chrome_multiple_dll', {
342       'targets': [
343         {
344           'target_name': 'chrome_child_dll',
345           'type': 'shared_library',
346           'product_name': 'chrome_child',
347           'variables': {
348             'enable_wexit_time_destructors': 1,
349           },
350           'dependencies': [
351             '<@(chromium_child_dependencies)',
352             '../content/content.gyp:content_app_child',
353             '../content/content.gyp:content_worker',
354             'chrome_version_resources',
355             'policy_path_parser',
356           ],
357           'defines': [
358             'CHROME_MULTIPLE_DLL_CHILD',
359           ],
360           'sources': [
361             '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
362             'app/chrome_main.cc',
363             'app/chrome_main_delegate.cc',
364             'app/chrome_main_delegate.h',
365           ],
366           'conditions': [
367             ['OS=="win"', {
368               'dependencies': [
369                 '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf',
370               ],
371             }],
372           ],
373         },  # target chrome_child_dll
374       ],
375     }],
376   ],