[flang] Support OPEN(..., FORM="BINARY") (#124657)
[llvm-project.git] / lld / test / MachO / reproduce-thin-archive-objc.s
blob8159f03f0f7408a41c1bd75f8f88b0bc64d42c17
1 # REQUIRES: x86
3 ## For a long time, LLD only included those members from thin archives that were actually used
4 ## during linking. However, we need to iterate over all members for -ObjC, check that we don't
5 ## crash when we encounter a missing member.
7 # RUN: rm -rf %t && mkdir %t && cd %t
8 # RUN: sed s/SYM/_main/ %s | llvm-mc -filetype=obj -triple=x86_64-apple-macos -o main.o
9 # RUN: sed s/SYM/_unused/ %s | llvm-mc -filetype=obj -triple=x86_64-apple-macos -o unused.o
11 # RUN: llvm-ar rcsT unused.a unused.o; rm unused.o
12 ## FIXME: Absolute paths don't end up relativized in the repro file.
14 # RUN: %no-fatal-warnings-lld %t/main.o %t/unused.a -ObjC -o /dev/null 2>&1 \
15 # RUN: | FileCheck %s --check-prefix=WARN
17 # RUN: %lld main.o unused.a -ObjC --no-warn-thin-archive-missing-members 2>&1 | count 0
19 # WARN: warning: {{.*}}unused.a: -ObjC failed to open archive member: 'unused.o'
21 .text
22 .globl SYM
23 SYM:
24 ret