| # This test intentionally checks for fatal errors, and fatal errors aren't supported for testing when main is run twice. | |
| # XFAIL: main-run-twice | |
| # RUN: rm -rf %t && mkdir -p %t | |
| # RUN: echo > %t/empty.o | |
| # RUN: llvm-ar --format=gnu cr %t/not-elf.a %t/empty.o | |
| # RUN: not ld.lld --whole-archive %t/not-elf.a -o /dev/null 2>&1 | FileCheck %s | |
| # CHECK: error: {{.*}}not-elf.a(empty.o): not an ELF file |