Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / install-name.s
blob1cf675e278bfab342132c29664d25bcb07a8a9da
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t.o %s
5 # RUN: %no-fatal-warnings-lld --warn-dylib-install-name -o %t.exec %t.o \
6 # RUN: -install_name foo 2>&1 | FileCheck --check-prefix=WARN %s
7 # RUN: llvm-objdump --macho --all-headers %t.exec \
8 # RUN: | FileCheck --check-prefix=NO-ID %s
10 # RUN: %no-fatal-warnings-lld --warn-dylib-install-name -bundle -o %t.bundle %t.o \
11 # RUN: -install_name foo 2>&1 | FileCheck --check-prefix=WARN %s
12 # RUN: llvm-objdump --macho --all-headers %t.bundle \
13 # RUN: | FileCheck --check-prefix=NO-ID %s
15 # RUN: %lld -bundle -o %t.bundle %t.o -install_name foo 2>&1
16 # RUN: llvm-objdump --macho --all-headers %t.bundle \
17 # RUN: | FileCheck --check-prefix=NO-ID %s
19 # RUN: %lld -bundle --warn-dylib-install-name --no-warn-dylib-install-name \
20 # RUN: -o %t.bundle %t.o -install_name foo 2>&1
21 # RUN: llvm-objdump --macho --all-headers %t.bundle \
22 # RUN: | FileCheck --check-prefix=NO-ID %s
24 # RUN: %lld -dylib -o %t.dylib %t.o -install_name foo 2>&1
25 # RUN: llvm-objdump --macho --all-headers %t.dylib \
26 # RUN: | FileCheck --check-prefix=ID %s
28 # WARN: warning: -install_name foo: ignored, only has effect with -dylib [--warn-dylib-install-name]
30 # NO-ID-NOT: LC_ID_DYLIB
32 # ID: cmd LC_ID_DYLIB
33 # ID-NEXT: cmdsize
34 # LID-NEXT: name foo
36 .globl _main
37 _main:
38 ret