Source
lipo -create -arch x86_64 ${filename}.dSYM.64/Contents/Resources/DWARF/${filename} \
COMPILER='@@@'
SUFFIX='---'
PREFIX='&&&'
OUTPUT_O='NO'
OUTPUT=''
NAMED_OUTPUT=''
LASTFILE=''
INTEL='NO'
SIZE32='NO'
SIZE64='NO'
NEWARGS=''
SKIP='NO'
for arg in $@
do
if [ $SKIP = 'ARCH' ]; then
# intercept -arch option and set SIZEXX
SKIP='NO'
if [ $arg = 'x86_64' ] || [ $arg = 'ppc64' ]; then
SIZE64='YES'
else
SIZE32='YES'
fi
# which architecture are we compiling for?
if [ $arg = 'x86_64' ] || [ $arg = 'i386' ]; then
INTEL='YES'
fi
elif [ $arg = '-arch' ]; then
SKIP='ARCH'
elif [ $arg = '--version' ]; then
${COMPILER} --version
exit 0
elif [ $arg = '-dumpversion' ]; then
${COMPILER} -dumpversion
exit 0
else
NEWARGS+="$arg "
# if the -c option is given, the output is .o
if [ $arg = '-c' ]; then
OUTPUT_O='YES'
fi
# if the output file is given by a -o option, record it
if [ $SKIP = 'O' ]; then
SKIP='NO'
NAMED_OUTPUT=$arg
fi
if [ $arg = '-o' ]; then
SKIP='O'
fi
# Note each file ending by ${SUFFIX} and remember the last one
# Transform them in .o
if `echo $arg | grep -q "${SUFFIX}$"`; then