blob: 318009413b1c29b2e5c455b17596bab659681186 [file] [log] [blame]
Simon Atanasyane0157542012-10-31 12:01:53 +00001// Check -B driver option.
2//
3// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
4// RUN: -B %S/Inputs/B_opt_tree/dir1 2>&1 \
5// RUN: | FileCheck --check-prefix=CHECK-B-OPT-TRIPLE %s
Stephen Hines176edba2014-12-01 14:53:08 -08006// CHECK-B-OPT-TRIPLE: "{{.*}}/Inputs/B_opt_tree/dir1{{/|\\\\}}i386-unknown-linux-ld"
Simon Atanasyane0157542012-10-31 12:01:53 +00007//
8// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
9// RUN: -B %S/Inputs/B_opt_tree/dir2 2>&1 \
10// RUN: | FileCheck --check-prefix=CHECK-B-OPT-DIR %s
Stephen Hines176edba2014-12-01 14:53:08 -080011// CHECK-B-OPT-DIR: "{{.*}}/Inputs/B_opt_tree/dir2{{/|\\\\}}ld"
Simon Atanasyane0157542012-10-31 12:01:53 +000012//
13// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
14// RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- 2>&1 \
15// RUN: | FileCheck --check-prefix=CHECK-B-OPT-PREFIX %s
Stephen Hines176edba2014-12-01 14:53:08 -080016// CHECK-B-OPT-PREFIX: "{{.*}}/Inputs/B_opt_tree/dir3{{/|\\\\}}prefix-ld"
Simon Atanasyane0157542012-10-31 12:01:53 +000017//
18// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
19// RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- \
20// RUN: -B %S/Inputs/B_opt_tree/dir2 2>&1 \
21// RUN: | FileCheck --check-prefix=CHECK-B-OPT-MULT %s
Stephen Hines176edba2014-12-01 14:53:08 -080022// CHECK-B-OPT-MULT: "{{.*}}/Inputs/B_opt_tree/dir3{{/|\\\\}}prefix-ld"