1 # Copyright (c) 2011 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.
7 'chromium_code': 1, # Use higher warning level.
8 'directxsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py ../third_party/directxsdk)',
11 '../build/win_precompile.gypi',
16 'defines': ['CONTENT_IMPLEMENTATION'],
19 # In component mode, we build all of content as a single DLL.
20 # However, in the static mode, we need to build content as multiple
21 # targets in order to prevent dependencies from getting introduced
22 # upstream unnecessarily (e.g., content_renderer depends on allocator
23 # and chrome_exe depends on content_common but we don't want
24 # chrome_exe to have to depend on allocator).
26 # TODO(dpranke): Remove the mac conditional once the circular
27 # dependencies in WebKit.gyp are fixed.
28 # See https://bugs.webkit.org/show_bug.cgi?id=68463
29 ['OS=="mac" or component=="static_library" or incremental_chrome_dll==1', {
31 'COMPILE_CONTENT_STATICALLY',
34 {'target_name': 'content',
42 'content_ppapi_plugin',
48 {'target_name': 'content_app',
49 'type': 'static_library',
50 'variables': { 'enable_wexit_time_destructors': 1, },
58 {'target_name': 'content_browser',
59 'type': 'static_library',
60 'variables': { 'enable_wexit_time_destructors': 1, },
62 'content_browser.gypi',
68 {'target_name': 'content_common',
69 'type': 'static_library',
70 'variables': { 'enable_wexit_time_destructors': 1, },
72 'content_common.gypi',
75 'content_resources.gyp:content_resources',
78 {'target_name': 'content_gpu',
79 'type': 'static_library',
80 'variables': { 'enable_wexit_time_destructors': 1, },
88 {'target_name': 'content_plugin',
89 'type': 'static_library',
90 'variables': { 'enable_wexit_time_destructors': 1, },
92 'content_plugin.gypi',
98 {'target_name': 'content_ppapi_plugin',
99 'type': 'static_library',
100 'variables': { 'enable_wexit_time_destructors': 1, },
102 'content_ppapi_plugin.gypi',
105 {'target_name': 'content_renderer',
106 'type': 'static_library',
107 'variables': { 'enable_wexit_time_destructors': 1, },
109 'content_renderer.gypi',
115 {'target_name': 'content_utility',
116 'type': 'static_library',
117 'variables': { 'enable_wexit_time_destructors': 1, },
119 'content_utility.gypi',
125 {'target_name': 'content_worker',
126 'type': 'static_library',
127 'variables': { 'enable_wexit_time_destructors': 1, },
129 'content_worker.gypi',
140 'target_name': 'closure_blocks_leopard_compat',
141 'defines!': ['CONTENT_IMPLEMENTATION'],
143 ['mac_sdk == "10.5"', {
144 'type': 'shared_library',
145 'product_name': 'closure_blocks_leopard_compat_stub',
147 # This target controls stripping directly. See below.
151 'browser/mac/closure_blocks_leopard_compat.S',
154 # These values are taken from libSystem.dylib in the 10.5
155 # SDK. Setting LD_DYLIB_INSTALL_NAME causes anything linked
156 # against this stub library to look for the symbols it
157 # provides in the real libSystem at runtime. When using ld
158 # from Xcode 4 or later (ld64-123.2 and up), giving two
159 # libraries with the same "install name" to the linker will
160 # cause it to print "ld: warning: dylibs with same install
161 # name". This is harmless, and ld will behave as intended
164 # The real library's compatibility version is used, and the
165 # value of the current version from the SDK is used to make
166 # it appear as though anything linked against this stub was
167 # linked against the real thing.
168 'LD_DYLIB_INSTALL_NAME': '/usr/lib/libSystem.B.dylib',
169 'DYLIB_COMPATIBILITY_VERSION': '1.0.0',
170 'DYLIB_CURRENT_VERSION': '111.1.4',
172 # Turn on stripping (yes, even in debug mode), and add the -c
173 # flag. This is what produces a stub library (MH_DYLIB_STUB)
174 # as opposed to a dylib (MH_DYLIB). MH_DYLIB_STUB files
175 # contain symbol tables and everything else needed for
176 # linking, but are stripped of section contents. This is the
177 # same way that the stub libraries in Mac OS X SDKs are
178 # created. dyld will refuse to load a stub library, so this
179 # provides some insurance in case anyone tries to load the
181 'DEPLOYMENT_POSTPROCESSING': 'YES',
182 'STRIP_STYLE': 'non-global',
185 }, { # else: mac_sdk != "10.5"
186 # When using the 10.6 SDK or newer, the necessary definitions
187 # are already present in libSystem.dylib. There is no need to
188 # build a stub dylib to provide these symbols at link time.
189 # This target is still useful to cause those symbols to be
190 # treated as weak imports in dependents, who still must
191 # #include closure_blocks_leopard_compat.h to get weak imports.
200 { # component != static_library
202 {'target_name': 'content',
203 'type': 'shared_library',
204 'variables': { 'enable_wexit_time_destructors': 1, },
207 'content_browser.gypi',
208 'content_common.gypi',
210 'content_plugin.gypi',
211 'content_ppapi_plugin.gypi',
212 'content_renderer.gypi',
213 'content_utility.gypi',
214 'content_worker.gypi',
217 {'target_name': 'content_app',
219 'dependencies': ['content', 'content_browser'],
221 {'target_name': 'content_browser',
223 'dependencies': ['content'],
225 {'target_name': 'content_common',
227 'dependencies': ['content', 'content_resources.gyp:content_resources'],
229 {'target_name': 'content_gpu',
231 'dependencies': ['content'],
233 {'target_name': 'content_plugin',
235 'dependencies': ['content'],
237 {'target_name': 'content_ppapi_plugin',
239 'dependencies': ['content'],
241 {'target_name': 'content_renderer',
243 'dependencies': ['content'],
245 {'target_name': 'content_utility',
247 'dependencies': ['content'],
249 {'target_name': 'content_worker',
251 'dependencies': ['content'],