Adam Snaider | 1c095c9 | 2023-07-08 02:09:58 -0400 | [diff] [blame^] | 1 | #!/bin/bash |
2 | # | ||||
3 | # When compiling with --platforms=//:ios_sim_arm64 or --platforms=//:ios_x86_64, | ||||
4 | # the library should not contain any references to macOS (platform 1) | ||||
5 | |||||
6 | set -e | ||||
7 | |||||
8 | if [[ "$OSTYPE" != "darwin"* ]]; then | ||||
9 | echo "This test only makes sense on macOS." | ||||
10 | exit 0 | ||||
11 | fi | ||||
12 | |||||
13 | if otool -l $1 | grep 'platform 1'; then | ||||
14 | echo "macOS detected." | ||||
15 | exit 1 | ||||
16 | fi |