1 // RUN: %clang %s -### \
2 // RUN:     -target x86_64-unknown-freebsd 2>&1 \
3 // RUN:   | FileCheck %s --check-prefix=CHECK-FREEBSD-LD
4 // CHECK-FREEBSD-LD: ld
5 
6 // RUN: %clang %s -### -fuse-ld=bfd \
7 // RUN:     --sysroot=%S/Inputs/basic_freebsd_tree \
8 // RUN:     -target x86_64-unknown-freebsd \
9 // RUN:     -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \
10 // RUN:   | FileCheck %s -check-prefix=CHECK-FREEBSD-BFD
11 // CHECK-FREEBSD-BFD: Inputs/basic_freebsd_tree/usr/bin{{/|\\+}}ld.bfd
12 
13 // RUN: %clang %s -### -fuse-ld=gold \
14 // RUN:     --sysroot=%S/Inputs/basic_freebsd_tree \
15 // RUN:     -target x86_64-unknown-freebsd \
16 // RUN:     -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \
17 // RUN:   | FileCheck %s -check-prefix=CHECK-FREEBSD-GOLD
18 // CHECK-FREEBSD-GOLD: Inputs/basic_freebsd_tree/usr/bin{{/|\\+}}ld.gold
19 
20 // RUN: %clang %s -### -fuse-ld=plib \
21 // RUN:     --sysroot=%S/Inputs/basic_freebsd_tree \
22 // RUN:     -target x86_64-unknown-freebsd \
23 // RUN:     -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \
24 // RUN:   | FileCheck %s -check-prefix=CHECK-FREEBSD-PLIB
25 // CHECK-FREEBSD-PLIB: error: invalid linker name
26 
27 
28 
29 // RUN: %clang %s -### \
30 // RUN:     -target arm-linux-androideabi \
31 // RUN:     -B%S/Inputs/basic_android_tree/bin 2>&1 \
32 // RUN:   | FileCheck %s --check-prefix=CHECK-ANDROID-ARM-LD
33 // CHECK-ANDROID-ARM-LD: Inputs/basic_android_tree/bin{{/|\\+}}arm-linux-androideabi-ld
34 
35 // RUN: %clang %s -### -fuse-ld=bfd \
36 // RUN:     -target arm-linux-androideabi \
37 // RUN:     -B%S/Inputs/basic_android_tree/bin 2>&1 \
38 // RUN:   | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-BFD
39 // CHECK-ANDROID-ARM-BFD: Inputs/basic_android_tree/bin{{/|\\+}}arm-linux-androideabi-ld.bfd
40 
41 // RUN: %clang %s -### -fuse-ld=gold \
42 // RUN:     -target arm-linux-androideabi \
43 // RUN:     -B%S/Inputs/basic_android_tree/bin 2>&1 \
44 // RUN:   | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-GOLD
45 // CHECK-ANDROID-ARM-GOLD: Inputs/basic_android_tree/bin{{/|\\+}}arm-linux-androideabi-ld.gold
46 
47 // RUN: %clang %s -### \
48 // RUN:     -target arm-linux-androideabi \
49 // RUN:     -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
50 // RUN:   | FileCheck %s --check-prefix=CHECK-ANDROID-ARM-LD-TC
51 // CHECK-ANDROID-ARM-LD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin{{/|\\+}}ld
52 
53 // RUN: %clang %s -### -fuse-ld=bfd \
54 // RUN:     -target arm-linux-androideabi \
55 // RUN:     -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
56 // RUN:   | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-BFD-TC
57 // CHECK-ANDROID-ARM-BFD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin{{/|\\+}}ld.bfd
58 
59 // RUN: %clang %s -### -fuse-ld=gold \
60 // RUN:     -target arm-linux-androideabi \
61 // RUN:     -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
62 // RUN:   | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-GOLD-TC
63 // CHECK-ANDROID-ARM-GOLD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin{{/|\\+}}ld.gold
64