Index: chrome/tools/build/mac/verify_order |
diff --git a/chrome/tools/build/mac/verify_order b/chrome/tools/build/mac/verify_order |
index 3d5d644a4c484afbcc1dd5941daf5332e81a87c8..88c3b97262b6e2d23c578cebab39fdfc3a7357a7 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++. |
Nico
2015/10/23 13:05:33
Looks like this script currently also runs in comp
Mark Mentovai
2015/10/23 13:56:36
Go (1). This script is pointless with component=sh
Nico
2015/10/23 15:39:29
Done.
|
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 -q libstdc++ <<< ${LIBS} ; then |
Mark Mentovai
2015/10/23 13:56:36
+ has a special meaning in regular expressions. Yo
Nico
2015/10/23 15:39:29
Done.
|
+ echo "${0}: ${MACH_O_FILE} depends on libstdc++" >& 2 |
+ exit 1 |
+fi |
+if grep -q libc++ <<< ${LIBS} ; then |
+ echo "${0}: ${MACH_O_FILE} depends on libc++" >& 2 |
+ exit 1 |
+fi |
+ |
exit 0 |