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_dependencies)',
78 'app/policy/cloud_policy_codegen.gyp:policy',
83 '../ui/compositor/compositor.gyp:compositor',
88 '<(SHARED_INTERMEDIATE_DIR)/ash/ash_resources/ash_wallpaper_resources.rc',
92 'product_name': 'chrome',
94 # On Windows, link the dependencies (libraries) that make
95 # up actual Chromium functionality into this .dll.
96 'chrome_dll_pdb_workaround',
97 'chrome_resources.gyp:chrome_resources',
98 'chrome_version_resources',
99 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
100 '../content/content.gyp:content_worker',
101 '../crypto/crypto.gyp:crypto',
102 '../printing/printing.gyp:printing',
103 '../net/net.gyp:net_resources',
104 '../third_party/cld/cld.gyp:cld',
105 '../ui/views/views.gyp:views',
106 '../webkit/support/webkit_support.gyp:webkit_resources',
109 'app/chrome_command_ids.h',
111 'app/chrome_dll_resource.h',
112 'app/chrome_main.cc',
113 'app/chrome_main_delegate.cc',
114 'app/chrome_main_delegate.h',
116 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
117 '../base/win/dllmain.cc',
119 '../ui/resources/cursors/aliasb.cur',
120 '../ui/resources/cursors/cell.cur',
121 '../ui/resources/cursors/col_resize.cur',
122 '../ui/resources/cursors/copy.cur',
123 '../ui/resources/cursors/none.cur',
124 '../ui/resources/cursors/row_resize.cur',
125 '../ui/resources/cursors/vertical_text.cur',
126 '../ui/resources/cursors/zoom_in.cur',
127 '../ui/resources/cursors/zoom_out.cur',
129 # TODO: It would be nice to have these pulled in
130 # automatically from direct_dependent_settings in
131 # their various targets (net.gyp:net_resources, etc.),
132 # but that causes errors in other targets when
133 # resulting .res files get referenced multiple times.
134 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
135 '<(SHARED_INTERMEDIATE_DIR)/chrome/chrome_unscaled_resources.rc',
136 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
137 '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc',
138 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.rc',
139 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
140 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
141 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
144 '<(DEPTH)/third_party/wtl/include',
156 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
163 'BaseAddress': '0x01c30000',
164 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
165 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
168 ['incremental_chrome_dll==1', {
169 'OutputFile': '$(OutDir)\\initial\\chrome.dll',
170 'UseLibraryDependencyInputs': "true",
191 'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest',
195 ['OS=="mac" and component!="shared_library"', {
196 'includes': [ 'chrome_dll_bundle.gypi' ],
198 ['OS=="mac" and component=="shared_library"', {
199 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
203 # Define the order of symbols within the framework. This
205 'ORDER_FILE': 'app/framework.order',
208 'app/chrome_command_ids.h',
209 'app/chrome_dll_resource.h',
210 'app/chrome_main.cc',
211 'app/chrome_main_delegate.cc',
212 'app/chrome_main_delegate.h',
213 'app/chrome_main_app_mode_mac.mm',
214 'app/chrome_main_mac.mm',
215 'app/chrome_main_mac.h',
222 # This step causes an error to be raised if the .order file
223 # does not account for all global text symbols. It
224 # validates the completeness of the .order file.
225 'postbuild_name': 'Verify global text symbol order',
227 'verify_order_path': 'tools/build/mac/verify_order',
230 '<(verify_order_path)',
232 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
237 ['mac_breakpad_compiled_in==1', {
239 '../breakpad/breakpad.gyp:breakpad',
240 'app/policy/cloud_policy_codegen.gyp:policy',
243 'app/breakpad_mac.mm',
244 'app/breakpad_mac.h',
246 }, { # else: mac_breakpad_compiled_in!=1
247 # No Breakpad, put in the stubs.
249 'app/breakpad_mac_stubs.mm',
250 'app/breakpad_mac.h',
252 }], # mac_breakpad_compiled_in
255 '../pdf/pdf.gyp:pdf',
261 }, # target chrome_dll
263 }], # OS=="mac" or OS=="win"
267 # This target is only depended upon on Windows.
268 'target_name': 'chrome_dll_pdb_workaround',
269 'type': 'static_library',
270 'sources': [ 'empty_pdb_workaround.cc' ],
272 ['fastbuild==0 or win_z7!=0', {
274 'VCCLCompilerTool': {
275 # This *in the compile phase* must match the pdb name that's
276 # output by the final link. See empty_pdb_workaround.cc for
278 'DebugInformationFormat': '3',
279 'ProgramDataBaseFileName': '<(PRODUCT_DIR)/chrome.dll.pdb',