Skip to content

Instantly share code, notes, and snippets.

@carlossless
Created September 14, 2017 14:12
Show Gist options
  • Save carlossless/9492d8e20938cfd1ee8163d7cdbfab9b to your computer and use it in GitHub Desktop.
Save carlossless/9492d8e20938cfd1ee8163d7cdbfab9b to your computer and use it in GitHub Desktop.
Check Carthage dependency binaries for LLVM Instrumentation symbols
#!/usr/bin/env bash
FRAMEWORK_BINARIES=$(find . -path "./Carthage/Build/*.framework/*" -type f -maxdepth 5 ! -name "*.*")
check_framework () {
printf "Checking $1..."
if OTOOL_OUTPUT=$(otool -l -arch all "$1" | grep __llvm_prf) ; then
printf " LLVM instrumentation symbols found:\n"
printf "$OTOOL_OUTPUT\n\n"
else
printf " No LLVM instrumentation symbols found.\n"
fi
}
for b in $FRAMEWORK_BINARIES; do
check_framework "$b"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment