blob: 51273fd7b8269ca1e9d5b7e47ac5a8cf252485ae [file] [log] [blame]
Simon Atanasyan86bdab72012-10-31 12:01:53 +00001// Check -B driver option.
2//
3// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
Jonas Hahnfeld1cdcf8f2017-01-08 10:04:07 +00004// RUN: -B %S/Inputs/B_opt_tree/dir1 -fuse-ld=ld 2>&1 \
Simon Atanasyan86bdab72012-10-31 12:01:53 +00005// RUN: | FileCheck --check-prefix=CHECK-B-OPT-TRIPLE %s
Reid Kleckner74a68162014-08-05 22:39:07 +00006// CHECK-B-OPT-TRIPLE: "{{.*}}/Inputs/B_opt_tree/dir1{{/|\\\\}}i386-unknown-linux-ld"
Simon Atanasyan86bdab72012-10-31 12:01:53 +00007//
8// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
Jonas Hahnfeld1cdcf8f2017-01-08 10:04:07 +00009// RUN: -B %S/Inputs/B_opt_tree/dir2 -fuse-ld=ld 2>&1 \
Simon Atanasyan86bdab72012-10-31 12:01:53 +000010// RUN: | FileCheck --check-prefix=CHECK-B-OPT-DIR %s
Reid Kleckner74a68162014-08-05 22:39:07 +000011// CHECK-B-OPT-DIR: "{{.*}}/Inputs/B_opt_tree/dir2{{/|\\\\}}ld"
Simon Atanasyan86bdab72012-10-31 12:01:53 +000012//
13// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
Jonas Hahnfeld1cdcf8f2017-01-08 10:04:07 +000014// RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- -fuse-ld=ld 2>&1 \
Simon Atanasyan86bdab72012-10-31 12:01:53 +000015// RUN: | FileCheck --check-prefix=CHECK-B-OPT-PREFIX %s
Reid Kleckner74a68162014-08-05 22:39:07 +000016// CHECK-B-OPT-PREFIX: "{{.*}}/Inputs/B_opt_tree/dir3{{/|\\\\}}prefix-ld"
Simon Atanasyan86bdab72012-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- \
Jonas Hahnfeld1cdcf8f2017-01-08 10:04:07 +000020// RUN: -B %S/Inputs/B_opt_tree/dir2 2>&1 -fuse-ld=ld \
Simon Atanasyan86bdab72012-10-31 12:01:53 +000021// RUN: | FileCheck --check-prefix=CHECK-B-OPT-MULT %s
Reid Kleckner74a68162014-08-05 22:39:07 +000022// CHECK-B-OPT-MULT: "{{.*}}/Inputs/B_opt_tree/dir3{{/|\\\\}}prefix-ld"