Skip to content

Commit 553fbec

Browse files
committed
test: read archive minos via otool directly (ar x extraction failed)
1 parent 19a6ec9 commit 553fbec

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎.github/workflows/temp-libcxx-floor11.yml‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ jobs:
3939
4040
- name: Assert archive object minos
4141
run: |
42-
mkdir -p /tmp/ar && cd /tmp/ar
43-
ar x /tmp/rb/lib/libc++.a $(ar t /tmp/rb/lib/libc++.a | head -1)
44-
OBJ=$(ls *.o | head -1)
45-
otool -l "$OBJ" | grep -A4 "LC_BUILD_VERSION\|LC_VERSION_MIN" | head -8
46-
otool -l "$OBJ" | grep -E "minos 11.0|version 11.0" \
42+
# otool reads archives directly (per-member load commands).
43+
otool -l /tmp/rb/lib/libc++.a 2>/dev/null | grep -A4 "LC_BUILD_VERSION" | head -10
44+
otool -l /tmp/rb/lib/libc++.a 2>/dev/null | grep -m1 -E "minos 11.0" \
4745
|| { echo "FAIL: objects not built for 11.0"; exit 1; }
4846
echo "OK: archives built for macOS 11.0"
4947

0 commit comments

Comments
 (0)