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 '../ui/views/views.gyp:views',
111 '../webkit/webkit_resources.gyp:webkit_resources',
114 'app/chrome_command_ids.h',
116 'app/chrome_dll_resource.h',
117 'app/chrome_main.cc',
118 'app/chrome_main_delegate.cc',
119 'app/chrome_main_delegate.h',
120 'app/delay_load_hook_win.cc',
121 'app/delay_load_hook_win.h',
123 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
124 '../base/win/dllmain.cc',
127 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
130 '<(DEPTH)/third_party/wtl/include',
136 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
143 'BaseAddress': '0x01c30000',
144 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
145 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
148 ['incremental_chrome_dll==1', {
149 'OutputFile': '$(OutDir)\\initial\\chrome.dll',
150 'UseLibraryDependencyInputs': "true",
152 ['target_arch=="ia32"', {
153 # Link against the XP-constrained user32 import library
154 # instead of the platform-SDK provided one to avoid
155 # inadvertently taking dependencies on post-XP user32
157 'AdditionalDependencies!': [
160 'IgnoreDefaultLibraryNames': [
163 # Remove user32 delay load for chrome.dll.
167 'AdditionalDependencies': [
173 'AdditionalLibraryDirectories': [
174 '<(DEPTH)/build/win/importlibs/x86',
176 'ForceSymbolReferences': [
177 # Force the inclusion of the delay load hook in this
179 '_ChromeDelayLoadHook@8',
201 'AdditionalManifestFiles': [
202 '$(ProjectDir)\\app\\chrome.dll.manifest',
207 ['win_use_allocator_shim==1', {
209 '<(allocator_target)',
214 ['chrome_multiple_dll==1', {
216 'CHROME_MULTIPLE_DLL_BROWSER',
220 '<@(chromium_child_dependencies)',
221 '../content/content.gyp:content_app_both',
222 '../content/content.gyp:content_worker',
225 '../content/content.gyp:content_app_browser',
228 ['cld_version==0 or cld_version==1', {
230 '../third_party/cld/cld.gyp:cld',
233 ['cld_version==0 or cld_version==2', {
235 '../third_party/cld_2/cld_2.gyp:cld_2',
238 ['OS=="mac" and component!="shared_library"', {
239 'includes': [ 'chrome_dll_bundle.gypi' ],
241 ['OS=="mac" and component=="shared_library"', {
242 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
246 # Define the order of symbols within the framework. This
248 'ORDER_FILE': 'app/framework.order',
251 'app/chrome_command_ids.h',
252 'app/chrome_dll_resource.h',
253 'app/chrome_main.cc',
254 'app/chrome_main_delegate.cc',
255 'app/chrome_main_delegate.h',
256 'app/chrome_main_mac.mm',
257 'app/chrome_main_mac.h',
264 # This step causes an error to be raised if the .order file
265 # does not account for all global text symbols. It
266 # validates the completeness of the .order file.
267 'postbuild_name': 'Verify global text symbol order',
269 'verify_order_path': 'tools/build/mac/verify_order',
272 '<(verify_order_path)',
274 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
279 ['mac_breakpad_compiled_in==1', {
281 '../breakpad/breakpad.gyp:breakpad',
282 '../components/components.gyp:breakpad_component',
283 'app/policy/cloud_policy_codegen.gyp:policy',
286 'app/breakpad_mac.mm',
287 'app/breakpad_mac.h',
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',
298 'app/breakpad_mac_stubs.mm',
299 'app/breakpad_mac.h',
301 }], # mac_breakpad_compiled_in
304 '../pdf/pdf.gyp:pdf',
310 }, # target chrome_main_dll
312 }], # OS=="mac" or OS=="win"
316 # This target is only depended upon on Windows.
317 'target_name': 'chrome_dll_pdb_workaround',
318 'type': 'static_library',
319 'sources': [ 'empty_pdb_workaround.cc' ],
321 ['fastbuild==0 or win_z7!=0', {
323 'VCCLCompilerTool': {
324 # This *in the compile phase* must match the pdb name that's
325 # output by the final link. See empty_pdb_workaround.cc for
327 'DebugInformationFormat': '3',
328 'ProgramDataBaseFileName': '<(PRODUCT_DIR)/chrome.dll.pdb',
336 ['chrome_multiple_dll', {
339 'target_name': 'chrome_child_dll',
340 'type': 'shared_library',
341 'product_name': 'chrome_child',
343 'enable_wexit_time_destructors': 1,
346 '<@(chromium_child_dependencies)',
347 '../content/content.gyp:content_app_child',
348 '../content/content.gyp:content_worker',
349 'chrome_version_resources',
350 'policy_path_parser',
353 'CHROME_MULTIPLE_DLL_CHILD',
356 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
357 '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc',
358 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
359 'app/chrome_main.cc',
360 'app/chrome_main_delegate.cc',
361 'app/chrome_main_delegate.h',
363 }, # target chrome_child_dll