1 // Check -B driver option. 2 3 /// Target triple prefix is not detected for -B. 4 // RUN: %clang %s -### -o %t.o -target i386-unknown-linux \ 5 // RUN: -B %S/Inputs/B_opt_tree/dir1 -fuse-ld=ld 2>&1 \ 6 // RUN: | FileCheck --check-prefix=CHECK-B-OPT-TRIPLE %s 7 // CHECK-B-OPT-TRIPLE-NOT: "{{.*}}/Inputs/B_opt_tree/dir1{{/|\\\\}}i386-unknown-linux-ld" 8 // 9 // RUN: %clang %s -### -o %t.o -target i386-unknown-linux \ 10 // RUN: -B %S/Inputs/B_opt_tree/dir2 -fuse-ld=ld 2>&1 \ 11 // RUN: | FileCheck --check-prefix=CHECK-B-OPT-DIR %s 12 // CHECK-B-OPT-DIR: "{{.*}}/Inputs/B_opt_tree/dir2{{/|\\\\}}ld" 13 // 14 // RUN: %clang %s -### -o %t.o -target i386-unknown-linux \ 15 // RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- -fuse-ld=ld 2>&1 \ 16 // RUN: | FileCheck --check-prefix=CHECK-B-OPT-PREFIX %s 17 // CHECK-B-OPT-PREFIX: "{{.*}}/Inputs/B_opt_tree/dir3{{/|\\\\}}prefix-ld" 18 // 19 // RUN: %clang %s -### -o %t.o -target i386-unknown-linux \ 20 // RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- \ 21 // RUN: -B %S/Inputs/B_opt_tree/dir2 2>&1 -fuse-ld=ld \ 22 // RUN: | FileCheck --check-prefix=CHECK-B-OPT-MULT %s 23 // CHECK-B-OPT-MULT: "{{.*}}/Inputs/B_opt_tree/dir3{{/|\\\\}}prefix-ld" 24 // 25 // RUN: %clang -B %S/Inputs/does_not_exist -print-search-dirs \ 26 // RUN: -target aarch64-linux-gnu \ 27 // RUN: | FileCheck --check-prefix=CHECK-B-OPT-INVALID %s 28 // CHECK-B-OPT-INVALID-NOT: /..//bin 29