16e92f468SNico Weber# REQUIRES: x86 26e92f468SNico Weber 36e92f468SNico Weber# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t.o %s 46e92f468SNico Weber 54490a26aSJez Ng# RUN: %no-fatal-warnings-lld --warn-dylib-install-name -o %t.exec %t.o \ 6adfbb541SVincent Lee# RUN: -install_name foo 2>&1 | FileCheck --check-prefix=WARN %s 76e92f468SNico Weber# RUN: llvm-objdump --macho --all-headers %t.exec \ 86e92f468SNico Weber# RUN: | FileCheck --check-prefix=NO-ID %s 96e92f468SNico Weber 104490a26aSJez Ng# RUN: %no-fatal-warnings-lld --warn-dylib-install-name -bundle -o %t.bundle %t.o \ 11adfbb541SVincent Lee# RUN: -install_name foo 2>&1 | FileCheck --check-prefix=WARN %s 12adfbb541SVincent Lee# RUN: llvm-objdump --macho --all-headers %t.bundle \ 13adfbb541SVincent Lee# RUN: | FileCheck --check-prefix=NO-ID %s 14adfbb541SVincent Lee 15adfbb541SVincent Lee# RUN: %lld -bundle -o %t.bundle %t.o -install_name foo 2>&1 16adfbb541SVincent Lee# RUN: llvm-objdump --macho --all-headers %t.bundle \ 17adfbb541SVincent Lee# RUN: | FileCheck --check-prefix=NO-ID %s 18adfbb541SVincent Lee 19adfbb541SVincent Lee# RUN: %lld -bundle --warn-dylib-install-name --no-warn-dylib-install-name \ 20adfbb541SVincent Lee# RUN: -o %t.bundle %t.o -install_name foo 2>&1 216e92f468SNico Weber# RUN: llvm-objdump --macho --all-headers %t.bundle \ 226e92f468SNico Weber# RUN: | FileCheck --check-prefix=NO-ID %s 236e92f468SNico Weber 246e92f468SNico Weber# RUN: %lld -dylib -o %t.dylib %t.o -install_name foo 2>&1 256e92f468SNico Weber# RUN: llvm-objdump --macho --all-headers %t.dylib \ 266e92f468SNico Weber# RUN: | FileCheck --check-prefix=ID %s 276e92f468SNico Weber 28adfbb541SVincent Lee# WARN: warning: -install_name foo: ignored, only has effect with -dylib [--warn-dylib-install-name] 296e92f468SNico Weber 306e92f468SNico Weber# NO-ID-NOT: LC_ID_DYLIB 316e92f468SNico Weber 326e92f468SNico Weber# ID: cmd LC_ID_DYLIB 336e92f468SNico Weber# ID-NEXT: cmdsize 34*f97f039eSklensy# ID-NEXT: name foo 356e92f468SNico Weber 366e92f468SNico Weber.globl _main 376e92f468SNico Weber_main: 386e92f468SNico Weber ret 39