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 ['incremental_chrome_dll==1', {
25 # Linking to a different directory and then hardlinking back
26 # to OutDir is a workaround to avoid having the .ilk for
27 # chrome.exe and chrome.dll conflicting. See crbug.com/92528
28 # for more information. Done on the dll instead of the exe so
29 # that people launching from VS don't need to modify
30 # $(TargetPath) for the exe.
33 'action_name': 'hardlink_to_output',
35 '$(OutDir)\\initial\\chrome.dll',
38 '$(OutDir)\\chrome.dll',
40 'action': ['tools\\build\\win\\hardlink_failsafe.bat',
41 '$(OutDir)\\initial\\chrome.dll',
42 '$(OutDir)\\chrome.dll'],
43 'msvs_cygwin_shell': 0,
47 # Only hardlink pdb if we're generating debug info.
48 ['fastbuild==0 or win_z7!=0', {
51 'action_name': 'hardlink_pdb_to_output',
53 # Not the pdb, since gyp doesn't know about it
54 '$(OutDir)\\initial\\chrome.dll',
57 '$(OutDir)\\chrome.dll.pdb',
59 'action': ['tools\\build\\win\\hardlink_failsafe.bat',
60 '$(OutDir)\\initial\\chrome.dll.pdb',
61 '$(OutDir)\\chrome.dll.pdb'],
62 'msvs_cygwin_shell': 0,
71 'target_name': 'chrome_main_dll',
72 'type': 'shared_library',
74 'enable_wexit_time_destructors': 1,
77 '<@(chromium_browser_dependencies)',
78 '<@(chromium_child_dependencies)',
79 '../content/content.gyp:content_worker',
80 'app/policy/cloud_policy_codegen.gyp:policy',
85 '../ui/compositor/compositor.gyp:compositor',
90 '<(SHARED_INTERMEDIATE_DIR)/ash/ash_resources/ash_wallpaper_resources.rc',
93 ['OS=="win" and target_arch=="ia32"', {
94 # Add a dependency to custom import library for user32 delay
95 # imports only in x86 builds.
97 'chrome_user32_delay_imports',
101 'product_name': 'chrome',
103 # On Windows, link the dependencies (libraries) that make
104 # up actual Chromium functionality into this .dll.
105 'chrome_dll_pdb_workaround',
106 'chrome_resources.gyp:chrome_resources',
107 'chrome_version_resources',
108 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
109 '../crypto/crypto.gyp:crypto',
110 '../printing/printing.gyp:printing',
111 '../net/net.gyp:net_resources',
112 '../third_party/cld/cld.gyp:cld',
113 '../ui/views/views.gyp:views',
114 '../webkit/support/webkit_support.gyp:webkit_resources',
117 'app/chrome_command_ids.h',
119 'app/chrome_dll_resource.h',
120 'app/chrome_main.cc',
121 'app/chrome_main_delegate.cc',
122 'app/chrome_main_delegate.h',
123 'app/delay_load_hook_win.cc',
124 'app/delay_load_hook_win.h',
126 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
127 '../base/win/dllmain.cc',
129 '../ui/resources/cursors/aliasb.cur',
130 '../ui/resources/cursors/cell.cur',
131 '../ui/resources/cursors/col_resize.cur',
132 '../ui/resources/cursors/copy.cur',
133 '../ui/resources/cursors/none.cur',
134 '../ui/resources/cursors/row_resize.cur',
135 '../ui/resources/cursors/vertical_text.cur',
136 '../ui/resources/cursors/zoom_in.cur',
137 '../ui/resources/cursors/zoom_out.cur',
139 # TODO: It would be nice to have these pulled in
140 # automatically from direct_dependent_settings in
141 # their various targets (net.gyp:net_resources, etc.),
142 # but that causes errors in other targets when
143 # resulting .res files get referenced multiple times.
144 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
145 '<(SHARED_INTERMEDIATE_DIR)/chrome/chrome_unscaled_resources.rc',
146 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
147 '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc',
148 '<(SHARED_INTERMEDIATE_DIR)/content/content_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/webkit_chromium_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': '$(ProjectDir)\\app\\chrome.dll.manifest',
229 ['OS=="mac" and component!="shared_library"', {
230 'includes': [ 'chrome_dll_bundle.gypi' ],
232 ['OS=="mac" and component=="shared_library"', {
233 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
235 ['chrome_split_dll', {
237 # See comment in .cc for explanation.
238 'split_dll_fake_entry.cc',
242 'AdditionalOptions': ['/splitlink'],
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_app_mode_mac.mm',
259 'app/chrome_main_mac.mm',
260 'app/chrome_main_mac.h',
267 # This step causes an error to be raised if the .order file
268 # does not account for all global text symbols. It
269 # validates the completeness of the .order file.
270 'postbuild_name': 'Verify global text symbol order',
272 'verify_order_path': 'tools/build/mac/verify_order',
275 '<(verify_order_path)',
277 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
282 ['mac_breakpad_compiled_in==1', {
284 '../breakpad/breakpad.gyp:breakpad',
285 'app/policy/cloud_policy_codegen.gyp:policy',
288 'app/breakpad_mac.mm',
289 'app/breakpad_mac.h',
291 }, { # else: mac_breakpad_compiled_in!=1
292 # No Breakpad, put in the stubs.
294 'app/breakpad_mac_stubs.mm',
295 'app/breakpad_mac.h',
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',