2 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
5 ## Check that -rpath generates LC_RPATH.
6 # RUN: %lld -o %t %t.o -rpath /some/rpath -rpath /another/rpath
7 # RUN: llvm-objdump --macho --all-headers %t | FileCheck %s
9 # CHECK-NEXT: cmdsize 24
10 # CHECK-NEXT: path /some/rpath
12 # CHECK-NEXT: cmdsize 32
13 # CHECK-NEXT: path /another/rpath
15 ## Check that -rpath entries are deduplicated.
16 # RUN: not %lld %t.o -o /dev/null -rpath /some/rpath -rpath /other/rpath -rpath /some/rpath 2>&1 | \
17 # RUN: FileCheck --check-prefix=FATAL %s
18 # FATAL: error: duplicate -rpath '/some/rpath' ignored [--warn-duplicate-rpath]
20 # RUN: %lld -o %t-dup %t.o -rpath /some/rpath -rpath /other/rpath -rpath /some/rpath --no-warn-duplicate-rpath
21 # RUN: llvm-objdump --macho --all-headers %t-dup | FileCheck %s --check-prefix=DEDUP
23 # DEDUP-NEXT: cmdsize 24
24 # DEDUP-NEXT: path /some/rpath
26 # DEDUP-NEXT: cmdsize 32
27 # DEDUP-NEXT: path /other/rpath