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.
6 ['OS=="mac" or OS=="win"', {
9 'target_name': 'chrome_dll',
15 ['OS=="mac" and component=="shared_library"', {
16 'type': 'shared_library',
17 'includes': [ 'chrome_dll_bundle.gypi' ],
20 '-Wl,-reexport_library,<(PRODUCT_DIR)/libchrome_main_dll.dylib',
24 ['chrome_multiple_dll==1', {
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.
38 'action_name': 'hardlink_to_output',
40 '$(OutDir)\\initial\\chrome.dll',
43 '$(OutDir)\\chrome.dll',
45 'action': ['tools\\build\\win\\hardlink_failsafe.bat',
46 '$(OutDir)\\initial\\chrome.dll',
47 '$(OutDir)\\chrome.dll'],
48 'msvs_cygwin_shell': 0,
52 # Only hardlink pdb if we're generating debug info.
53 ['fastbuild==0 or win_z7!=0', {
56 'action_name': 'hardlink_pdb_to_output',
58 # Not the pdb, since gyp doesn't know about it
59 '$(OutDir)\\initial\\chrome.dll',
62 '$(OutDir)\\chrome.dll.pdb',
64 'action': ['tools\\build\\win\\hardlink_failsafe.bat',
65 '$(OutDir)\\initial\\chrome.dll.pdb',
66 '$(OutDir)\\chrome.dll.pdb'],
67 'msvs_cygwin_shell': 0,
76 'target_name': 'chrome_main_dll',
77 'type': 'shared_library',
79 'enable_wexit_time_destructors': 1,
82 '<@(chromium_browser_dependencies)',
83 '../content/content.gyp:content_app_browser',
84 'app/policy/cloud_policy_codegen.gyp:policy',
89 '../ui/compositor/compositor.gyp:compositor',
92 ['OS=="win" and target_arch=="ia32"', {
93 # Add a dependency to custom import library for user32 delay
94 # imports only in x86 builds.
96 'chrome_user32_delay_imports',
100 'product_name': 'chrome',
102 # On Windows, link the dependencies (libraries) that make
103 # up actual Chromium functionality into this .dll.
104 'chrome_dll_pdb_workaround',
105 'chrome_resources.gyp:chrome_resources',
106 'chrome_version_resources',
107 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
108 '../crypto/crypto.gyp:crypto',
109 '../printing/printing.gyp:printing',
110 '../net/net.gyp:net_resources',
111 '../third_party/cld/cld.gyp:cld',
112 '../ui/views/views.gyp:views',
113 '../webkit/webkit_resources.gyp:webkit_resources',
116 'app/chrome_command_ids.h',
118 'app/chrome_dll_resource.h',
119 'app/chrome_main.cc',
120 'app/chrome_main_delegate.cc',
121 'app/chrome_main_delegate.h',
122 'app/delay_load_hook_win.cc',
123 'app/delay_load_hook_win.h',
125 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
126 '../base/win/dllmain.cc',
128 '../ui/resources/cursors/aliasb.cur',
129 '../ui/resources/cursors/cell.cur',
130 '../ui/resources/cursors/col_resize.cur',
131 '../ui/resources/cursors/copy.cur',
132 '../ui/resources/cursors/none.cur',
133 '../ui/resources/cursors/row_resize.cur',
134 '../ui/resources/cursors/vertical_text.cur',
135 '../ui/resources/cursors/zoom_in.cur',
136 '../ui/resources/cursors/zoom_out.cur',
138 # TODO: It would be nice to have these pulled in
139 # automatically from direct_dependent_settings in
140 # their various targets (net.gyp:net_resources, etc.),
141 # but that causes errors in other targets when
142 # resulting .res files get referenced multiple times.
143 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
144 '<(SHARED_INTERMEDIATE_DIR)/chrome/chrome_unscaled_resources.rc',
145 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
146 '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc',
147 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.rc',
148 '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.rc',
149 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
150 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
151 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.rc',
154 '<(DEPTH)/third_party/wtl/include',
160 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
167 'BaseAddress': '0x01c30000',
168 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
169 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
172 ['incremental_chrome_dll==1', {
173 'OutputFile': '$(OutDir)\\initial\\chrome.dll',
174 'UseLibraryDependencyInputs': "true",
176 ['target_arch=="ia32"', {
177 # Link against the XP-constrained user32 import library
178 # instead of the platform-SDK provided one to avoid
179 # inadvertently taking dependencies on post-XP user32
181 'AdditionalDependencies!': [
184 'IgnoreDefaultLibraryNames': [
187 # Remove user32 delay load for chrome.dll.
191 'AdditionalDependencies': [
197 'AdditionalLibraryDirectories': [
198 '<(DEPTH)/build/win/importlibs/x86',
200 'ForceSymbolReferences': [
201 # Force the inclusion of the delay load hook in this
203 '_ChromeDelayLoadHook@8',
225 'AdditionalManifestFiles': [
226 '$(ProjectDir)\\app\\chrome.dll.manifest',
231 ['win_use_allocator_shim==1', {
233 '<(allocator_target)',
238 ['chrome_multiple_dll==1', {
240 'CHROME_MULTIPLE_DLL_BROWSER',
244 '<@(chromium_child_dependencies)',
245 '../content/content.gyp:content_app_both',
246 '../content/content.gyp:content_worker',
249 '../content/content.gyp:content_app_browser',
252 ['OS=="mac" and component!="shared_library"', {
253 'includes': [ 'chrome_dll_bundle.gypi' ],
255 ['OS=="mac" and component=="shared_library"', {
256 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
260 # Define the order of symbols within the framework. This
262 'ORDER_FILE': 'app/framework.order',
265 'app/chrome_command_ids.h',
266 'app/chrome_dll_resource.h',
267 'app/chrome_main.cc',
268 'app/chrome_main_delegate.cc',
269 'app/chrome_main_delegate.h',
270 'app/chrome_main_mac.mm',
271 'app/chrome_main_mac.h',
278 # This step causes an error to be raised if the .order file
279 # does not account for all global text symbols. It
280 # validates the completeness of the .order file.
281 'postbuild_name': 'Verify global text symbol order',
283 'verify_order_path': 'tools/build/mac/verify_order',
286 '<(verify_order_path)',
288 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
293 ['mac_breakpad_compiled_in==1', {
295 '../breakpad/breakpad.gyp:breakpad',
296 '../components/components.gyp:breakpad_component',
297 'app/policy/cloud_policy_codegen.gyp:policy',
300 'app/breakpad_mac.mm',
301 'app/breakpad_mac.h',
302 'app/chrome_breakpad_client.cc',
303 'app/chrome_breakpad_client.h',
304 'app/chrome_breakpad_client_mac.mm',
306 }, { # else: mac_breakpad_compiled_in!=1
307 # No Breakpad, put in the stubs.
309 '../components/components.gyp:breakpad_stubs',
312 'app/breakpad_mac_stubs.mm',
313 'app/breakpad_mac.h',
315 }], # mac_breakpad_compiled_in
318 '../pdf/pdf.gyp:pdf',
324 }, # target chrome_main_dll
326 }], # OS=="mac" or OS=="win"
330 # This target is only depended upon on Windows.
331 'target_name': 'chrome_dll_pdb_workaround',
332 'type': 'static_library',
333 'sources': [ 'empty_pdb_workaround.cc' ],
335 ['fastbuild==0 or win_z7!=0', {
337 'VCCLCompilerTool': {
338 # This *in the compile phase* must match the pdb name that's
339 # output by the final link. See empty_pdb_workaround.cc for
341 'DebugInformationFormat': '3',
342 'ProgramDataBaseFileName': '<(PRODUCT_DIR)/chrome.dll.pdb',
350 ['chrome_multiple_dll', {
353 'target_name': 'chrome_child_dll',
354 'type': 'shared_library',
355 'product_name': 'chrome_child',
357 'enable_wexit_time_destructors': 1,
360 '<@(chromium_child_dependencies)',
361 '../content/content.gyp:content_app_child',
362 '../content/content.gyp:content_worker',
363 'chrome_version_resources',
364 'policy_path_parser',
367 'CHROME_MULTIPLE_DLL_CHILD',
370 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
371 '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc',
372 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
373 'app/chrome_main.cc',
374 'app/chrome_main_delegate.cc',
375 'app/chrome_main_delegate.h',
377 }, # target chrome_child_dll