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

Unified Diff: build/mac/strip_from_xcode

Issue 9659: Fast release builds (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | « build/googleurl.xcodeproj/project.pbxproj ('k') | build/mac/strip_save_dsym » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/mac/strip_from_xcode
===================================================================
--- build/mac/strip_from_xcode (revision 0)
+++ build/mac/strip_from_xcode (revision 0)
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# Copyright (c) 2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This is a handy wrapper script that figures out how to call the strip
+# utility (strip_save_dsym in this case), if it even needs to be called at all,
+# and then does it. This script should be called by a post-link phase in
+# targets that might generate Mach-O executables, dynamic libraries, or
+# loadable bundles.
+#
+# An example "Strip If Needed" build phase placed after "Link Binary With
+# Libraries" would do:
+# exec "${XCODEPROJ_DEPTH}/build/mac/strip_from_xcode"
+
+if [ "${CONFIGURATION}" != "Release" ] ; then
+ # Only strip in release mode.
+ exit 0
+fi
+
+# MACH_O_TYPE is not set for a command-line tool, so check PRODUCT_TYPE too.
+# Weird.
+if [ "${MACH_O_TYPE}" = "mh_execute" ] || \
+ [ "${PRODUCT_TYPE}" = "com.apple.product-type.tool" ] ; then
+ # Strip everything
+ STRIPFLAGS=
+elif [ "${MACH_O_TYPE}" = "mh_dylib" ] || \
+ "${MACH_O_TYPE}" = "mh_bundle" ]; then
+ # Strip debugging symbols and local symbols
+ STRIPFLAGS="-S -x"
+elif [ "${MACH_O_TYPE}" = "staticlib" ] ; then
+ # Don't strip static libraries.
+ exit 0
+else
+ # Warn, but don't treat this as an error.
+ echo $0: warning: unrecognized MACH_O_TYPE ${MACH_O_TYPE}
+ exit 0
+fi
+
+exec "$(dirname ${0})/strip_save_dsym" ${STRIPFLAGS} \
+ "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"
Property changes on: build/mac/strip_from_xcode
___________________________________________________________________
Added: svn:executable
+ *
« no previous file with comments | « build/googleurl.xcodeproj/project.pbxproj ('k') | build/mac/strip_save_dsym » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698