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_version_resources',
106 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
107 '../crypto/crypto.gyp:crypto',
108 '../printing/printing.gyp:printing',
109 '../net/net.gyp:net_resources',
110 '../third_party/cld/cld.gyp:cld',
111 '../ui/views/views.gyp:views',
112 '../webkit/webkit_resources.gyp:webkit_resources',
115 'app/chrome_command_ids.h',
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 '../ui/resources/cursors/aliasb.cur',
128 '../ui/resources/cursors/cell.cur',
129 '../ui/resources/cursors/col_resize.cur',
130 '../ui/resources/cursors/copy.cur',
131 '../ui/resources/cursors/none.cur',
132 '../ui/resources/cursors/row_resize.cur',
133 '../ui/resources/cursors/vertical_text.cur',
134 '../ui/resources/cursors/zoom_in.cur',
135 '../ui/resources/cursors/zoom_out.cur',
138 '<(DEPTH)/third_party/wtl/include',
144 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
151 'BaseAddress': '0x01c30000',
152 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
153 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
156 ['incremental_chrome_dll==1', {
157 'OutputFile': '$(OutDir)\\initial\\chrome.dll',
158 'UseLibraryDependencyInputs': "true",
160 ['target_arch=="ia32"', {
161 # Link against the XP-constrained user32 import library
162 # instead of the platform-SDK provided one to avoid
163 # inadvertently taking dependencies on post-XP user32
165 'AdditionalDependencies!': [
168 'IgnoreDefaultLibraryNames': [
171 # Remove user32 delay load for chrome.dll.
175 'AdditionalDependencies': [
181 'AdditionalLibraryDirectories': [
182 '<(DEPTH)/build/win/importlibs/x86',
184 'ForceSymbolReferences': [
185 # Force the inclusion of the delay load hook in this
187 '_ChromeDelayLoadHook@8',
209 'AdditionalManifestFiles': [
210 '$(ProjectDir)\\app\\chrome.dll.manifest',
215 ['win_use_allocator_shim==1', {
217 '<(allocator_target)',
222 ['chrome_multiple_dll==1', {
224 'CHROME_MULTIPLE_DLL_BROWSER',
228 '<@(chromium_child_dependencies)',
229 '../content/content.gyp:content_app_both',
230 '../content/content.gyp:content_worker',
233 '../content/content.gyp:content_app_browser',
236 ['OS=="mac" and component!="shared_library"', {
237 'includes': [ 'chrome_dll_bundle.gypi' ],
239 ['OS=="mac" and component=="shared_library"', {
240 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
244 # Define the order of symbols within the framework. This
246 'ORDER_FILE': 'app/framework.order',
249 'app/chrome_command_ids.h',
250 'app/chrome_dll_resource.h',
251 'app/chrome_main.cc',
252 'app/chrome_main_delegate.cc',
253 'app/chrome_main_delegate.h',
254 'app/chrome_main_mac.mm',
255 'app/chrome_main_mac.h',
262 # This step causes an error to be raised if the .order file
263 # does not account for all global text symbols. It
264 # validates the completeness of the .order file.
265 'postbuild_name': 'Verify global text symbol order',
267 'verify_order_path': 'tools/build/mac/verify_order',
270 '<(verify_order_path)',
272 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
277 ['mac_breakpad_compiled_in==1', {
279 '../breakpad/breakpad.gyp:breakpad',
280 '../components/components.gyp:breakpad_component',
281 'app/policy/cloud_policy_codegen.gyp:policy',
284 'app/breakpad_mac.mm',
285 'app/breakpad_mac.h',
286 'app/chrome_breakpad_client.cc',
287 'app/chrome_breakpad_client.h',
288 'app/chrome_breakpad_client_mac.mm',
290 }, { # else: mac_breakpad_compiled_in!=1
291 # No Breakpad, put in the stubs.
293 '../components/components.gyp:breakpad_stubs',
296 'app/breakpad_mac_stubs.mm',
297 'app/breakpad_mac.h',
299 }], # mac_breakpad_compiled_in
302 '../pdf/pdf.gyp:pdf',
308 }, # target chrome_main_dll
310 }], # OS=="mac" or OS=="win"
314 # This target is only depended upon on Windows.
315 'target_name': 'chrome_dll_pdb_workaround',
316 'type': 'static_library',
317 'sources': [ 'empty_pdb_workaround.cc' ],
319 ['fastbuild==0 or win_z7!=0', {
321 'VCCLCompilerTool': {
322 # This *in the compile phase* must match the pdb name that's
323 # output by the final link. See empty_pdb_workaround.cc for
325 'DebugInformationFormat': '3',
326 'ProgramDataBaseFileName': '<(PRODUCT_DIR)/chrome.dll.pdb',
334 ['chrome_multiple_dll', {
337 'target_name': 'chrome_child_dll',
338 'type': 'shared_library',
339 'product_name': 'chrome_child',
341 'enable_wexit_time_destructors': 1,
344 '<@(chromium_child_dependencies)',
345 '../content/content.gyp:content_app_child',
346 '../content/content.gyp:content_worker',
347 'chrome_version_resources',
348 'policy_path_parser',
351 'CHROME_MULTIPLE_DLL_CHILD',
354 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
355 '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc',
356 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
357 'app/chrome_main.cc',
358 'app/chrome_main_delegate.cc',
359 'app/chrome_main_delegate.h',
361 }, # target chrome_child_dll