Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1950)

Unified Diff: chrome/chrome_browser.gypi

Issue 7582032: Allow use of ^blocks, even with the 10.5 SDK, and even with a 10.5 runtime (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/mac/closure_blocks_leopard_compat_unittest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/chrome_browser.gypi
===================================================================
--- chrome/chrome_browser.gypi (revision 95891)
+++ chrome/chrome_browser.gypi (working copy)
@@ -4904,4 +4904,55 @@
'hard_dependency': 1,
},
],
+ 'conditions': [
+ ['OS=="mac"', {
+ 'targets': [
+ {
+ 'target_name': 'closure_blocks_leopard_compat',
+ 'conditions': [
+ ['mac_sdk == "10.5"', {
+ 'type': 'shared_library',
+ 'product_name': 'closure_blocks_leopard_compat_stub',
+ 'sources': [
+ 'browser/mac/closure_blocks_leopard_compat.S',
+ ],
+ 'xcode_settings': {
+ # These values are taken from libSystem.dylib in the 10.5 SDK.
+ # Setting LD_DYLIB_INSTALL_NAME causes anything linked against
+ # this stub library to look for the symbols it provides in the
+ # real libSystem at runtime. The real library's compatibility
+ # version is used, and the value of the current version from
+ # the SDK is used to make it appear as though anything linked
+ # against this stub was linked against the real thing.
+ 'LD_DYLIB_INSTALL_NAME': '/usr/lib/libSystem.B.dylib',
+ 'DYLIB_COMPATIBILITY_VERSION': '1.0.0',
+ 'DYLIB_CURRENT_VERSION': '111.1.4',
+
+ # Turn on stripping (yes, even in debug mode), and add the -c
+ # flag. This is what produces a stub library (MH_DYLIB_STUB)
+ # as opposed to a dylib (MH_DYLIB). MH_DYLIB_STUB files
+ # contain symbol tables and everything else needed for
+ # linking, but are stripped of section contents. This is the
+ # same way that the stub libraries in Mac OS X SDKs are
+ # created. dyld will refuse to load a stub library, so this
+ # provides some insurance in case anyone tries to load the
+ # stub at runtime.
+ 'DEPLOYMENT_POSTPROCESSING': 'YES',
+ 'STRIP_STYLE': 'non-global',
+ 'STRIPFLAGS': '-c',
+ },
+ }, { # else: mac_sdk != "10.5"
+ # When using the 10.6 SDK or newer, the necessary definitions
+ # are already present in libSystem.dylib. There is no need to
+ # build a stub dylib to provide these symbols at link time. This
+ # target is still useful to cause those symbols to be treated as
+ # weak imports in dependents, who still must #include
+ # closure_blocks_leopard_compat.h to get weak imports.
+ 'type': 'none',
+ }],
+ ],
+ },
+ ],
+ }],
+ ],
}
« no previous file with comments | « chrome/browser/mac/closure_blocks_leopard_compat_unittest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698