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

Unified Diff: build/mac/strip_from_xcode

Issue 1460001: Don't strip main from the browser or helper app executables (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « no previous file | chrome/app/app.saves » ('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 42807)
+++ build/mac/strip_from_xcode (working copy)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Copyright (c) 2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
@@ -19,16 +19,19 @@
exit 0
fi
+declare -a FLAGS
+
# 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=
+ # Strip everything (no special flags). No-op.
+ true
elif [ "${MACH_O_TYPE}" = "mh_dylib" ] || \
"${MACH_O_TYPE}" = "mh_bundle" ]; then
# Strip debugging symbols and local symbols
- STRIPFLAGS="-S -x"
+ FLAGS[${#FLAGS[@]}]=-S
+ FLAGS[${#FLAGS[@]}]=-x
elif [ "${MACH_O_TYPE}" = "staticlib" ] ; then
# Don't strip static libraries.
exit 0
@@ -38,5 +41,22 @@
exit 0
fi
-exec "$(dirname ${0})/strip_save_dsym" ${STRIPFLAGS} \
+if [ -n "${STRIPFLAGS}" ] ; then
+ # Pick up the standard STRIPFLAGS Xcode setting, used for "Additional Strip
+ # Flags".
+ for stripflag in "${STRIPFLAGS}" ; do
+ FLAGS[${#FLAGS[@]}]="${stripflag}"
+ done
+fi
+
+if [ -n "${CHROMIUM_STRIP_SAVE_FILE}" ] ; then
+ # An Xcode project can communicate a file listing symbols to saved in this
+ # environment variable by setting it as a build setting. This isn't a
+ # standard Xcode setting. It's used in preference to STRIPFLAGS to
+ # eliminate quoting ambiguity concerns.
+ FLAGS[${#FLAGS[@]}]=-s
+ FLAGS[${#FLAGS[@]}]="${CHROMIUM_STRIP_SAVE_FILE}"
+fi
+
+exec "$(dirname ${0})/strip_save_dsym" "${FLAGS[@]}" \
"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"
Property changes on: build/mac/strip_from_xcode
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « no previous file | chrome/app/app.saves » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698