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 '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf',
92 '../ui/compositor/compositor.gyp:compositor',
95 ['OS=="win" and target_arch=="ia32"', {
96 # Add a dependency to custom import library for user32 delay
97 # imports only in x86 builds.
99 'chrome_user32_delay_imports',
103 'product_name': 'chrome',
105 # On Windows, link the dependencies (libraries) that make
106 # up actual Chromium functionality into this .dll.
107 'chrome_dll_pdb_workaround',
108 'chrome_version_resources',
109 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
110 '../crypto/crypto.gyp:crypto',
111 '../net/net.gyp:net_resources',
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',
129 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
132 '<(DEPTH)/third_party/wtl/include',
138 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
145 'BaseAddress': '0x01c30000',
146 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
147 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
150 ['incremental_chrome_dll==1', {
151 'OutputFile': '$(OutDir)\\initial\\chrome.dll',
152 'UseLibraryDependencyInputs': "true",
154 ['target_arch=="ia32"', {
155 # Link against the XP-constrained user32 import library
156 # instead of the platform-SDK provided one to avoid
157 # inadvertently taking dependencies on post-XP user32
159 'AdditionalDependencies!': [
162 'IgnoreDefaultLibraryNames': [
165 # Remove user32 delay load for chrome.dll.
169 'AdditionalDependencies': [
175 'AdditionalLibraryDirectories': [
176 '<(DEPTH)/build/win/importlibs/x86',
178 'ForceSymbolReferences': [
179 # Force the inclusion of the delay load hook in this
181 '_ChromeDelayLoadHook@8',
203 'AdditionalManifestFiles': [
204 '$(ProjectDir)\\app\\chrome.dll.manifest',
209 ['win_use_allocator_shim==1', {
211 '<(allocator_target)',
214 ['enable_printing!=0', {
216 '../printing/printing.gyp:printing',
219 ['chrome_pgo_phase==1', {
222 'LinkTimeCodeGeneration': '2',
226 ['chrome_pgo_phase==2', {
229 'LinkTimeCodeGeneration': '3',
235 ['chrome_multiple_dll==1', {
237 'CHROME_MULTIPLE_DLL_BROWSER',
241 '<@(chromium_child_dependencies)',
242 '../content/content.gyp:content_app_both',
243 '../content/content.gyp:content_worker',
246 '../content/content.gyp:content_app_browser',
249 ['cld_version==0 or cld_version==1', {
251 '../third_party/cld/cld.gyp:cld',
254 ['cld_version==0 or cld_version==2', {
256 '../third_party/cld_2/cld_2.gyp:cld_2',
259 ['OS=="mac" and component!="shared_library"', {
260 'includes': [ 'chrome_dll_bundle.gypi' ],
262 ['OS=="mac" and component=="shared_library"', {
263 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
267 # Define the order of symbols within the framework. This
269 'ORDER_FILE': 'app/framework.order',
272 'app/chrome_command_ids.h',
273 'app/chrome_dll_resource.h',
274 'app/chrome_main.cc',
275 'app/chrome_main_delegate.cc',
276 'app/chrome_main_delegate.h',
277 'app/chrome_main_mac.mm',
278 'app/chrome_main_mac.h',
285 # This step causes an error to be raised if the .order file
286 # does not account for all global text symbols. It
287 # validates the completeness of the .order file.
288 'postbuild_name': 'Verify global text symbol order',
290 'verify_order_path': 'tools/build/mac/verify_order',
293 '<(verify_order_path)',
295 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
300 ['mac_breakpad_compiled_in==1', {
302 '../breakpad/breakpad.gyp:breakpad',
303 '../components/components.gyp:breakpad_component',
304 '../components/components.gyp:policy',
307 'app/chrome_breakpad_client.cc',
308 'app/chrome_breakpad_client.h',
309 'app/chrome_breakpad_client_mac.mm',
311 }, { # else: mac_breakpad_compiled_in!=1
312 # No Breakpad, put in the stubs.
314 '../components/components.gyp:breakpad_stubs',
316 }], # mac_breakpad_compiled_in
319 '../pdf/pdf.gyp:pdf',
325 }, # target chrome_main_dll
327 }], # OS=="mac" or OS=="win"
331 # This target is only depended upon on Windows.
332 'target_name': 'chrome_dll_pdb_workaround',
333 'type': 'static_library',
334 'sources': [ 'empty_pdb_workaround.cc' ],
336 ['fastbuild==0 or win_z7!=0', {
338 'VCCLCompilerTool': {
339 # This *in the compile phase* must match the pdb name that's
340 # output by the final link. See empty_pdb_workaround.cc for
342 'DebugInformationFormat': '3',
343 'ProgramDataBaseFileName': '<(PRODUCT_DIR)/chrome.dll.pdb',
351 ['chrome_multiple_dll', {
354 'target_name': 'chrome_child_dll',
355 'type': 'shared_library',
356 'product_name': 'chrome_child',
358 'enable_wexit_time_destructors': 1,
361 '<@(chromium_child_dependencies)',
362 '../content/content.gyp:content_app_child',
363 '../content/content.gyp:content_worker',
364 'chrome_version_resources',
365 'policy_path_parser',
368 'CHROME_MULTIPLE_DLL_CHILD',
371 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
372 'app/chrome_main.cc',
373 'app/chrome_main_delegate.cc',
374 'app/chrome_main_delegate.h',
379 '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf',
382 ['chrome_pgo_phase==1', {
385 'LinkTimeCodeGeneration': '2',
389 ['chrome_pgo_phase==2', {
392 'LinkTimeCodeGeneration': '3',
399 }, # target chrome_child_dll