diff options
Diffstat (limited to 'chrome/tools/build/mac/verify_order')
-rwxr-xr-x | chrome/tools/build/mac/verify_order | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/tools/build/mac/verify_order b/chrome/tools/build/mac/verify_order index 3d5d644..cfa4c5a 100755 --- a/chrome/tools/build/mac/verify_order +++ b/chrome/tools/build/mac/verify_order @@ -12,6 +12,8 @@ # # This script can be used to verify that all of the global text symbols in # a Mach-O file are accounted for in an order file. +# +# Also check that the file does not depend on either of libstdc++ or libc++. if [ ${#} -ne 2 ] ; then echo "usage: ${0} LAST_SYMBOL MACH_O_FILE" >& 2 @@ -40,4 +42,18 @@ if [ ${?} -eq 0 ] || [ -n "${UNORDERED_SYMBOLS}" ] ; then exit 1 fi +LIBS=$(otool -L "${MACH_O_FILE}") +if [ ${?} -ne 0 ] ; then + echo "${0}: failed to get libraries in ${MACH_O_FILE}" >& 2 + exit 1 +fi +if grep -Fq libstdc++ <<< ${LIBS} ; then + echo "${0}: ${MACH_O_FILE} depends on libstdc++" >& 2 + exit 1 +fi +if grep -Fq libc++ <<< ${LIBS} ; then + echo "${0}: ${MACH_O_FILE} depends on libc++" >& 2 + exit 1 +fi + exit 0 |