Re-enable stripping to produce an MH_DYLIB_STUB for
closure_blocks_leopard_compat_stub.

This was originally checked in at r95892, but the stripping was disabled in
r95895 because the original implementation resulted in a double-strip, and
you can't strip something again once it's been turned into an MH_DYLIB_STUB.

BUG=91978
TEST=Builds remain green
Review URL: http://codereview.chromium.org/7598037

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96025 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 7eb244c..cbae76ef 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -4917,6 +4917,10 @@
             ['mac_sdk == "10.5"', {
               'type': 'shared_library',
               'product_name': 'closure_blocks_leopard_compat_stub',
+              'variables': {
+                # This target controls stripping directly. See below.
+                'mac_strip': 0,
+              },
               'sources': [
                 'browser/mac/closure_blocks_leopard_compat.S',
               ],
@@ -4924,13 +4928,32 @@
                 # 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.
+                # real libSystem at runtime. When using ld from Xcode 4 or
+                # later (ld64-123.2 and up), giving two libraries with the
+                # same "install name" to the linker will cause it to print
+                # "ld: warning: dylibs with same install name". This is
+                # harmless, and ld will behave as intended here.
+                #
+                # 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