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 '../content/content.gyp:content_app_browser',
86 '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf',
89 ['OS=="win" and configuration_policy==1', {
91 '<(DEPTH)/components/components.gyp:policy',
96 '../ui/compositor/compositor.gyp:compositor',
99 ['OS=="win" and target_arch=="ia32"', {
100 # Add a dependency to custom import library for user32 delay
101 # imports only in x86 builds.
103 'chrome_user32_delay_imports',
107 'product_name': 'chrome',
109 # On Windows, link the dependencies (libraries) that make
110 # up actual Chromium functionality into this .dll.
111 'chrome_version_resources',
112 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
113 '../crypto/crypto.gyp:crypto',
114 '../net/net.gyp:net_resources',
115 '../ui/views/views.gyp:views',
116 '../webkit/webkit_resources.gyp:webkit_resources',
119 'app/chrome_command_ids.h',
121 'app/chrome_dll_resource.h',
122 'app/chrome_main.cc',
123 'app/chrome_main_delegate.cc',
124 'app/chrome_main_delegate.h',
125 'app/delay_load_hook_win.cc',
126 'app/delay_load_hook_win.h',
128 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
129 '../base/win/dllmain.cc',
132 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
135 '<(DEPTH)/third_party/wtl/include',
141 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
148 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
149 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
152 ['incremental_chrome_dll==1', {
153 'OutputFile': '$(OutDir)\\initial\\chrome.dll',
154 'UseLibraryDependencyInputs': "true",
156 ['target_arch=="ia32"', {
157 # Don't set an x64 base address (to avoid breaking HE-ASLR).
158 'BaseAddress': '0x01c30000',
159 # Link against the XP-constrained user32 import library
160 # instead of the platform-SDK provided one to avoid
161 # inadvertently taking dependencies on post-XP user32
163 'AdditionalDependencies!': [
166 'IgnoreDefaultLibraryNames': [
169 # Remove user32 delay load for chrome.dll.
173 'AdditionalDependencies': [
179 'AdditionalLibraryDirectories': [
180 '<(DEPTH)/build/win/importlibs/x86',
182 'ForceSymbolReferences': [
183 # Force the inclusion of the delay load hook in this
185 '_ChromeDelayLoadHook@8',
207 'AdditionalManifestFiles': [
208 '$(ProjectDir)\\app\\chrome.dll.manifest',
213 ['win_use_allocator_shim==1', {
215 '<(allocator_target)',
218 ['enable_printing!=0', {
220 '../printing/printing.gyp:printing',
223 ['chrome_pgo_phase==1', {
226 'LinkTimeCodeGeneration': '2',
230 ['chrome_pgo_phase==2', {
233 'LinkTimeCodeGeneration': '3',
239 ['chrome_multiple_dll==1', {
241 'CHROME_MULTIPLE_DLL_BROWSER',
245 '<@(chromium_child_dependencies)',
246 '../content/content.gyp:content_app_both',
247 '../content/content.gyp:content_worker',
250 '../content/content.gyp:content_app_browser',
253 ['cld_version==0 or cld_version==1', {
255 '../third_party/cld/cld.gyp:cld',
258 ['cld_version==0 or cld_version==2', {
260 '../third_party/cld_2/cld_2.gyp:cld_2',
263 ['OS=="mac" and component!="shared_library"', {
264 'includes': [ 'chrome_dll_bundle.gypi' ],
266 ['OS=="mac" and component=="shared_library"', {
267 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
271 # Define the order of symbols within the framework. This
273 'ORDER_FILE': 'app/framework.order',
276 'app/chrome_command_ids.h',
277 'app/chrome_dll_resource.h',
278 'app/chrome_main.cc',
279 'app/chrome_main_delegate.cc',
280 'app/chrome_main_delegate.h',
281 'app/chrome_main_mac.mm',
282 'app/chrome_main_mac.h',
285 '../pdf/pdf.gyp:pdf',
292 # This step causes an error to be raised if the .order file
293 # does not account for all global text symbols. It
294 # validates the completeness of the .order file.
295 'postbuild_name': 'Verify global text symbol order',
297 'verify_order_path': 'tools/build/mac/verify_order',
300 '<(verify_order_path)',
302 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
307 ['mac_breakpad_compiled_in==1', {
309 '../breakpad/breakpad.gyp:breakpad',
310 '../components/components.gyp:breakpad_component',
311 '../components/components.gyp:policy',
314 'app/chrome_breakpad_client.cc',
315 'app/chrome_breakpad_client.h',
316 'app/chrome_breakpad_client_mac.mm',
318 }, { # else: mac_breakpad_compiled_in!=1
319 # No Breakpad, put in the stubs.
321 '../components/components.gyp:breakpad_stubs',
323 }], # mac_breakpad_compiled_in
327 }, # target chrome_main_dll
329 }], # OS=="mac" or OS=="win"
330 ['chrome_multiple_dll', {
333 'target_name': 'chrome_child_dll',
334 'type': 'shared_library',
335 'product_name': 'chrome_child',
337 'enable_wexit_time_destructors': 1,
340 '<@(chromium_child_dependencies)',
341 '../content/content.gyp:content_app_child',
342 '../content/content.gyp:content_worker',
343 'chrome_version_resources',
344 'policy_path_parser',
347 'CHROME_MULTIPLE_DLL_CHILD',
350 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
351 'app/chrome_main.cc',
352 'app/chrome_main_delegate.cc',
353 'app/chrome_main_delegate.h',
358 '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf',
361 ['chrome_pgo_phase==1', {
364 'LinkTimeCodeGeneration': '2',
368 ['chrome_pgo_phase==2', {
371 'LinkTimeCodeGeneration': '3',
378 }, # target chrome_child_dll