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 # This target is only depended upon on Windows.
72 'target_name': 'chrome_dll_pdb_workaround',
73 'type': 'static_library',
74 'sources': [ 'empty_pdb_workaround.cc' ],
77 # This *in the compile phase* must match the pdb name that's
78 # output by the final link. See empty_pdb_workaround.cc for
80 'DebugInformationFormat': '3',
81 'ProgramDataBaseFileName': '<(PRODUCT_DIR)/chrome.dll.pdb',
86 'target_name': 'chrome_main_dll',
87 'type': 'shared_library',
89 'enable_wexit_time_destructors': 1,
92 '<@(chromium_dependencies)',
93 'app/policy/cloud_policy_codegen.gyp:policy',
98 '../ui/compositor/compositor.gyp:compositor',
103 '<(SHARED_INTERMEDIATE_DIR)/ash/ash_resources/ash_wallpaper_resources.rc',
107 'product_name': 'chrome',
109 # On Windows, link the dependencies (libraries) that make
110 # up actual Chromium functionality into this .dll.
111 'chrome_dll_pdb_workaround',
112 'chrome_resources.gyp:chrome_resources',
113 'chrome_version_resources',
114 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
115 '../content/content.gyp:content_worker',
116 '../crypto/crypto.gyp:crypto',
117 '../printing/printing.gyp:printing',
118 '../net/net.gyp:net_resources',
119 '../third_party/cld/cld.gyp:cld',
120 '../ui/views/views.gyp:views',
121 '../webkit/support/webkit_support.gyp:webkit_resources',
124 'app/chrome_command_ids.h',
126 'app/chrome_dll_resource.h',
127 'app/chrome_main.cc',
128 'app/chrome_main_delegate.cc',
129 'app/chrome_main_delegate.h',
131 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
132 '../base/win/dllmain.cc',
134 '../webkit/glue/resources/aliasb.cur',
135 '../webkit/glue/resources/cell.cur',
136 '../webkit/glue/resources/col_resize.cur',
137 '../webkit/glue/resources/copy.cur',
138 '../webkit/glue/resources/none.cur',
139 '../webkit/glue/resources/row_resize.cur',
140 '../webkit/glue/resources/vertical_text.cur',
141 '../webkit/glue/resources/zoom_in.cur',
142 '../webkit/glue/resources/zoom_out.cur',
144 # TODO: It would be nice to have these pulled in
145 # automatically from direct_dependent_settings in
146 # their various targets (net.gyp:net_resources, etc.),
147 # but that causes errors in other targets when
148 # resulting .res files get referenced multiple times.
149 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
150 '<(SHARED_INTERMEDIATE_DIR)/chrome/chrome_unscaled_resources.rc',
151 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
152 '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc',
153 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.rc',
154 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
155 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
156 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_unscaled_resources.rc',
158 # TODO(sgk): left-over from pre-gyp build, figure out
159 # if we still need them and/or how to update to gyp.
160 #'app/check_dependents.bat',
161 #'app/chrome.dll.deps',
164 '<(DEPTH)/third_party/wtl/include',
176 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
183 'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'],
184 'BaseAddress': '0x01c30000',
185 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
186 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
189 ['incremental_chrome_dll==1', {
190 'OutputFile': '$(OutDir)\\initial\\chrome.dll',
191 'UseLibraryDependencyInputs': "true",
212 'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest',
216 ['OS=="mac" and component!="shared_library"', {
217 'includes': [ 'chrome_dll_bundle.gypi' ],
219 ['OS=="mac" and component=="shared_library"', {
220 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
224 # Define the order of symbols within the framework. This
226 'ORDER_FILE': 'app/framework.order',
229 'app/chrome_command_ids.h',
230 'app/chrome_dll_resource.h',
231 'app/chrome_main.cc',
232 'app/chrome_main_delegate.cc',
233 'app/chrome_main_delegate.h',
234 'app/chrome_main_app_mode_mac.mm',
235 'app/chrome_main_mac.mm',
236 'app/chrome_main_mac.h',
243 # This step causes an error to be raised if the .order file
244 # does not account for all global text symbols. It
245 # validates the completeness of the .order file.
246 'postbuild_name': 'Verify global text symbol order',
248 'verify_order_path': 'tools/build/mac/verify_order',
251 '<(verify_order_path)',
253 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
258 ['mac_breakpad_compiled_in==1', {
260 '../breakpad/breakpad.gyp:breakpad',
261 'app/policy/cloud_policy_codegen.gyp:policy',
264 'app/breakpad_mac.mm',
265 'app/breakpad_mac.h',
267 }, { # else: mac_breakpad_compiled_in!=1
268 # No Breakpad, put in the stubs.
270 'app/breakpad_mac_stubs.mm',
271 'app/breakpad_mac.h',
273 }], # mac_breakpad_compiled_in
276 '../pdf/pdf.gyp:pdf',
282 }, # target chrome_dll
284 }], # OS=="mac" or OS=="win"