Passive login for Interactive Autofill dialog.
[chromium-blink-merge.git] / chrome / chrome_dll.gypi
blob8f5aab4afd39b281bd74b5943565a3206471876b
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             ['incremental_chrome_dll==1', {
25               # Linking to a different directory and then hardlinking back
26               # to OutDir is a workaround to avoid having the .ilk for
27               # chrome.exe and chrome.dll conflicting. See crbug.com/92528
28               # for more information. Done on the dll instead of the exe so
29               # that people launching from VS don't need to modify
30               # $(TargetPath) for the exe.
31               'actions': [
32                 {
33                   'action_name': 'hardlink_to_output',
34                   'inputs': [
35                     '$(OutDir)\\initial\\chrome.dll',
36                   ],
37                   'outputs': [
38                     '$(OutDir)\\chrome.dll',
39                   ],
40                   'action': ['tools\\build\\win\\hardlink_failsafe.bat',
41                              '$(OutDir)\\initial\\chrome.dll',
42                              '$(OutDir)\\chrome.dll'],
43                   'msvs_cygwin_shell': 0,
44                 },
45               ],
46               'conditions': [
47                 # Only hardlink pdb if we're generating debug info.
48                 ['fastbuild==0 or win_z7!=0', {
49                   'actions': [
50                     {
51                       'action_name': 'hardlink_pdb_to_output',
52                       'inputs': [
53                         # Not the pdb, since gyp doesn't know about it
54                         '$(OutDir)\\initial\\chrome.dll',
55                       ],
56                       'outputs': [
57                         '$(OutDir)\\chrome.dll.pdb',
58                       ],
59                       'action': ['tools\\build\\win\\hardlink_failsafe.bat',
60                                  '$(OutDir)\\initial\\chrome.dll.pdb',
61                                  '$(OutDir)\\chrome.dll.pdb'],
62                       'msvs_cygwin_shell': 0,
63                     }
64                   ]
65                 }]
66               ],
67             }],
68           ]
69         },
70         {
71           'target_name': 'chrome_main_dll',
72           'type': 'shared_library',
73           'variables': {
74             'enable_wexit_time_destructors': 1,
75           },
76           'dependencies': [
77             '<@(chromium_dependencies)',
78             'app/policy/cloud_policy_codegen.gyp:policy',
79           ],
80           'conditions': [
81             ['use_aura==1', {
82               'dependencies': [
83                 '../ui/compositor/compositor.gyp:compositor',
84               ],
85             }],
86             ['use_ash==1', {
87               'sources': [
88                 '<(SHARED_INTERMEDIATE_DIR)/ash/ash_resources/ash_wallpaper_resources.rc',
89               ],
90             }],
91             ['OS=="win"', {
92               'product_name': 'chrome',
93               'dependencies': [
94                 # On Windows, link the dependencies (libraries) that make
95                 # up actual Chromium functionality into this .dll.
96                 'chrome_dll_pdb_workaround',
97                 'chrome_resources.gyp:chrome_resources',
98                 'chrome_version_resources',
99                 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
100                 '../content/content.gyp:content_worker',
101                 '../crypto/crypto.gyp:crypto',
102                 '../printing/printing.gyp:printing',
103                 '../net/net.gyp:net_resources',
104                 '../third_party/cld/cld.gyp:cld',
105                 '../ui/views/views.gyp:views',
106                 '../webkit/support/webkit_support.gyp:webkit_resources',
107               ],
108               'sources': [
109                 'app/chrome_command_ids.h',
110                 'app/chrome_dll.rc',
111                 'app/chrome_dll_resource.h',
112                 'app/chrome_main.cc',
113                 'app/chrome_main_delegate.cc',
114                 'app/chrome_main_delegate.h',
116                 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
117                 '../base/win/dllmain.cc',
119                 '../ui/resources/cursors/aliasb.cur',
120                 '../ui/resources/cursors/cell.cur',
121                 '../ui/resources/cursors/col_resize.cur',
122                 '../ui/resources/cursors/copy.cur',
123                 '../ui/resources/cursors/none.cur',
124                 '../ui/resources/cursors/row_resize.cur',
125                 '../ui/resources/cursors/vertical_text.cur',
126                 '../ui/resources/cursors/zoom_in.cur',
127                 '../ui/resources/cursors/zoom_out.cur',
129                 # TODO:  It would be nice to have these pulled in
130                 # automatically from direct_dependent_settings in
131                 # their various targets (net.gyp:net_resources, etc.),
132                 # but that causes errors in other targets when
133                 # resulting .res files get referenced multiple times.
134                 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
135                 '<(SHARED_INTERMEDIATE_DIR)/chrome/chrome_unscaled_resources.rc',
136                 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
137                 '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc',
138                 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.rc',
139                 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
140                 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
141                 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
142               ],
143               'include_dirs': [
144                 '<(DEPTH)/third_party/wtl/include',
145               ],
146               'defines': [
147                 'CHROME_DLL',
148                 'BROWSER_DLL',
149                 'RENDERER_DLL',
150                 'PLUGIN_DLL',
151               ],
152               'configurations': {
153                 'Debug_Base': {
154                   'msvs_settings': {
155                     'VCLinkerTool': {
156                       'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
157                     },
158                   },
159                 },
160               },
161               'msvs_settings': {
162                 'VCLinkerTool': {
163                   'BaseAddress': '0x01c30000',
164                   'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
165                   # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
166                   'SubSystem': '2',
167                   'conditions': [
168                     ['incremental_chrome_dll==1', {
169                       'OutputFile': '$(OutDir)\\initial\\chrome.dll',
170                       'UseLibraryDependencyInputs': "true",
171                     }],
172                   ],
173                   'DelayLoadDLLs': [
174                     'comdlg32.dll',
175                     'crypt32.dll',
176                     'cryptui.dll',
177                     'dhcpcsvc.dll',
178                     'imagehlp.dll',
179                     'imm32.dll',
180                     'iphlpapi.dll',
181                     'setupapi.dll',
182                     'urlmon.dll',
183                     'winhttp.dll',
184                     'wininet.dll',
185                     'winspool.drv',
186                     'ws2_32.dll',
187                     'wsock32.dll',
188                   ],
189                 },
190                 'VCManifestTool': {
191                   'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest',
192                 },
193               },
194             }],  # OS=="win"
195             ['OS=="mac" and component!="shared_library"', {
196               'includes': [ 'chrome_dll_bundle.gypi' ],
197             }],
198             ['OS=="mac" and component=="shared_library"', {
199               'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
200             }],
201             ['OS=="mac"', {
202               'xcode_settings': {
203                 # Define the order of symbols within the framework.  This
204                 # sets -order_file.
205                 'ORDER_FILE': 'app/framework.order',
206               },
207               'sources': [
208                 'app/chrome_command_ids.h',
209                 'app/chrome_dll_resource.h',
210                 'app/chrome_main.cc',
211                 'app/chrome_main_delegate.cc',
212                 'app/chrome_main_delegate.h',
213                 'app/chrome_main_app_mode_mac.mm',
214                 'app/chrome_main_mac.mm',
215                 'app/chrome_main_mac.h',
216               ],
217               'include_dirs': [
218                 '<(grit_out_dir)',
219               ],
220               'postbuilds': [
221                 {
222                   # This step causes an error to be raised if the .order file
223                   # does not account for all global text symbols.  It
224                   # validates the completeness of the .order file.
225                   'postbuild_name': 'Verify global text symbol order',
226                   'variables': {
227                     'verify_order_path': 'tools/build/mac/verify_order',
228                   },
229                   'action': [
230                     '<(verify_order_path)',
231                     '_ChromeMain',
232                     '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
233                   ],
234                 },
235               ],
236               'conditions': [
237                 ['mac_breakpad_compiled_in==1', {
238                   'dependencies': [
239                     '../breakpad/breakpad.gyp:breakpad',
240                     'app/policy/cloud_policy_codegen.gyp:policy',
241                   ],
242                   'sources': [
243                     'app/breakpad_mac.mm',
244                     'app/breakpad_mac.h',
245                   ],
246                 }, {  # else: mac_breakpad_compiled_in!=1
247                   # No Breakpad, put in the stubs.
248                   'sources': [
249                     'app/breakpad_mac_stubs.mm',
250                     'app/breakpad_mac.h',
251                   ],
252                 }],  # mac_breakpad_compiled_in
253                 ['internal_pdf', {
254                   'dependencies': [
255                     '../pdf/pdf.gyp:pdf',
256                   ],
257                 }],
258               ],  # conditions
259             }],  # OS=="mac"
260           ],  # conditions
261         },  # target chrome_dll
262       ],  # targets
263     }],  # OS=="mac" or OS=="win"
264     ['OS=="win"', {
265       'targets': [
266         {
267           # This target is only depended upon on Windows.
268           'target_name': 'chrome_dll_pdb_workaround',
269           'type': 'static_library',
270           'sources': [ 'empty_pdb_workaround.cc' ],
271           'conditions': [
272             ['fastbuild==0 or win_z7!=0', {
273              'msvs_settings': {
274               'VCCLCompilerTool': {
275                 # This *in the compile phase* must match the pdb name that's
276                 # output by the final link. See empty_pdb_workaround.cc for
277                 # more details.
278                 'DebugInformationFormat': '3',
279                 'ProgramDataBaseFileName': '<(PRODUCT_DIR)/chrome.dll.pdb',
280               },
281              },
282             }],
283           ],
284         },
285       ],
286     }],
287   ],