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'],
51 # Only hardlink pdb if we're generating debug info.
52 ['fastbuild==0 or win_z7!=0', {
55 'action_name': 'hardlink_pdb_to_output',
57 # Not the pdb, since gyp doesn't know about it
58 '$(OutDir)\\initial\\chrome.dll',
61 '$(OutDir)\\chrome.dll.pdb',
63 'action': ['tools\\build\\win\\hardlink_failsafe.bat',
64 '$(OutDir)\\initial\\chrome.dll.pdb',
65 '$(OutDir)\\chrome.dll.pdb'],
74 'target_name': 'chrome_main_dll',
75 'type': 'shared_library',
77 'enable_wexit_time_destructors': 1,
80 '<@(chromium_browser_dependencies)',
81 '../components/components.gyp:policy',
82 '../content/content.gyp:content_app_browser',
87 '../ui/compositor/compositor.gyp:compositor',
90 ['OS=="win" and target_arch=="ia32"', {
91 # Add a dependency to custom import library for user32 delay
92 # imports only in x86 builds.
94 'chrome_user32_delay_imports',
98 'product_name': 'chrome',
100 # On Windows, link the dependencies (libraries) that make
101 # up actual Chromium functionality into this .dll.
102 'chrome_dll_pdb_workaround',
103 'chrome_version_resources',
104 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
105 '../crypto/crypto.gyp:crypto',
106 '../net/net.gyp:net_resources',
107 '../ui/views/views.gyp:views',
108 '../webkit/webkit_resources.gyp:webkit_resources',
111 'app/chrome_command_ids.h',
113 'app/chrome_dll_resource.h',
114 'app/chrome_main.cc',
115 'app/chrome_main_delegate.cc',
116 'app/chrome_main_delegate.h',
117 'app/delay_load_hook_win.cc',
118 'app/delay_load_hook_win.h',
120 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
121 '../base/win/dllmain.cc',
124 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
127 '<(DEPTH)/third_party/wtl/include',
133 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
140 'BaseAddress': '0x01c30000',
141 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
142 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
145 ['incremental_chrome_dll==1', {
146 'OutputFile': '$(OutDir)\\initial\\chrome.dll',
147 'UseLibraryDependencyInputs': "true",
149 ['target_arch=="ia32"', {
150 # Link against the XP-constrained user32 import library
151 # instead of the platform-SDK provided one to avoid
152 # inadvertently taking dependencies on post-XP user32
154 'AdditionalDependencies!': [
157 'IgnoreDefaultLibraryNames': [
160 # Remove user32 delay load for chrome.dll.
164 'AdditionalDependencies': [
170 'AdditionalLibraryDirectories': [
171 '<(DEPTH)/build/win/importlibs/x86',
173 'ForceSymbolReferences': [
174 # Force the inclusion of the delay load hook in this
176 '_ChromeDelayLoadHook@8',
198 'AdditionalManifestFiles': [
199 '$(ProjectDir)\\app\\chrome.dll.manifest',
204 ['win_use_allocator_shim==1', {
206 '<(allocator_target)',
209 ['enable_printing!=0', {
211 '../printing/printing.gyp:printing',
216 ['chrome_multiple_dll==1', {
218 'CHROME_MULTIPLE_DLL_BROWSER',
222 '<@(chromium_child_dependencies)',
223 '../content/content.gyp:content_app_both',
224 '../content/content.gyp:content_worker',
227 '../content/content.gyp:content_app_browser',
230 ['cld_version==0 or cld_version==1', {
232 '../third_party/cld/cld.gyp:cld',
235 ['cld_version==0 or cld_version==2', {
237 '../third_party/cld_2/cld_2.gyp:cld_2',
240 ['OS=="mac" and component!="shared_library"', {
241 'includes': [ 'chrome_dll_bundle.gypi' ],
243 ['OS=="mac" and component=="shared_library"', {
244 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
248 # Define the order of symbols within the framework. This
250 'ORDER_FILE': 'app/framework.order',
253 'app/chrome_command_ids.h',
254 'app/chrome_dll_resource.h',
255 'app/chrome_main.cc',
256 'app/chrome_main_delegate.cc',
257 'app/chrome_main_delegate.h',
258 'app/chrome_main_mac.mm',
259 'app/chrome_main_mac.h',
266 # This step causes an error to be raised if the .order file
267 # does not account for all global text symbols. It
268 # validates the completeness of the .order file.
269 'postbuild_name': 'Verify global text symbol order',
271 'verify_order_path': 'tools/build/mac/verify_order',
274 '<(verify_order_path)',
276 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
281 ['mac_breakpad_compiled_in==1', {
283 '../breakpad/breakpad.gyp:breakpad',
284 '../components/components.gyp:breakpad_component',
285 '../components/components.gyp:policy',
288 'app/chrome_breakpad_client.cc',
289 'app/chrome_breakpad_client.h',
290 'app/chrome_breakpad_client_mac.mm',
292 }, { # else: mac_breakpad_compiled_in!=1
293 # No Breakpad, put in the stubs.
295 '../components/components.gyp:breakpad_stubs',
297 }], # mac_breakpad_compiled_in
300 '../pdf/pdf.gyp:pdf',
306 }, # target chrome_main_dll
308 }], # OS=="mac" or OS=="win"
312 # This target is only depended upon on Windows.
313 'target_name': 'chrome_dll_pdb_workaround',
314 'type': 'static_library',
315 'sources': [ 'empty_pdb_workaround.cc' ],
317 ['fastbuild==0 or win_z7!=0', {
319 'VCCLCompilerTool': {
320 # This *in the compile phase* must match the pdb name that's
321 # output by the final link. See empty_pdb_workaround.cc for
323 'DebugInformationFormat': '3',
324 'ProgramDataBaseFileName': '<(PRODUCT_DIR)/chrome.dll.pdb',
332 ['chrome_multiple_dll', {
335 'target_name': 'chrome_child_dll',
336 'type': 'shared_library',
337 'product_name': 'chrome_child',
339 'enable_wexit_time_destructors': 1,
342 '<@(chromium_child_dependencies)',
343 '../content/content.gyp:content_app_child',
344 '../content/content.gyp:content_worker',
345 'chrome_version_resources',
346 'policy_path_parser',
349 'CHROME_MULTIPLE_DLL_CHILD',
352 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
353 'app/chrome_main.cc',
354 'app/chrome_main_delegate.cc',
355 'app/chrome_main_delegate.h',
357 }, # target chrome_child_dll