1# REQUIRES: x86 2 3# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t.o %s 4 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 9 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 14 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 18 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 23 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 27 28# WARN: warning: -install_name foo: ignored, only has effect with -dylib [--warn-dylib-install-name] 29 30# NO-ID-NOT: LC_ID_DYLIB 31 32# ID: cmd LC_ID_DYLIB 33# ID-NEXT: cmdsize 34# ID-NEXT: name foo 35 36.globl _main 37_main: 38 ret 39