2012-10-31 20:01:53 +08:00
|
|
|
// Check -B driver option.
|
2020-07-19 11:26:01 +08:00
|
|
|
|
|
|
|
/// Target triple prefix is not detected for -B.
|
2012-10-31 20:01:53 +08:00
|
|
|
// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
|
2017-01-08 18:04:07 +08:00
|
|
|
// RUN: -B %S/Inputs/B_opt_tree/dir1 -fuse-ld=ld 2>&1 \
|
2012-10-31 20:01:53 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-TRIPLE %s
|
2020-07-19 11:26:01 +08:00
|
|
|
// CHECK-B-OPT-TRIPLE-NOT: "{{.*}}/Inputs/B_opt_tree/dir1{{/|\\\\}}i386-unknown-linux-ld"
|
2012-10-31 20:01:53 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
|
2017-01-08 18:04:07 +08:00
|
|
|
// RUN: -B %S/Inputs/B_opt_tree/dir2 -fuse-ld=ld 2>&1 \
|
2012-10-31 20:01:53 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-DIR %s
|
2014-08-06 06:39:07 +08:00
|
|
|
// CHECK-B-OPT-DIR: "{{.*}}/Inputs/B_opt_tree/dir2{{/|\\\\}}ld"
|
2012-10-31 20:01:53 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
|
2017-01-08 18:04:07 +08:00
|
|
|
// RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- -fuse-ld=ld 2>&1 \
|
2012-10-31 20:01:53 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-PREFIX %s
|
2014-08-06 06:39:07 +08:00
|
|
|
// CHECK-B-OPT-PREFIX: "{{.*}}/Inputs/B_opt_tree/dir3{{/|\\\\}}prefix-ld"
|
2012-10-31 20:01:53 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
|
|
|
|
// RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- \
|
2017-01-08 18:04:07 +08:00
|
|
|
// RUN: -B %S/Inputs/B_opt_tree/dir2 2>&1 -fuse-ld=ld \
|
2012-10-31 20:01:53 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-MULT %s
|
2014-08-06 06:39:07 +08:00
|
|
|
// CHECK-B-OPT-MULT: "{{.*}}/Inputs/B_opt_tree/dir3{{/|\\\\}}prefix-ld"
|
2019-05-22 05:21:35 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -B %S/Inputs/does_not_exist -print-search-dirs \
|
|
|
|
// RUN: -target aarch64-linux-gnu \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-INVALID %s
|
|
|
|
// CHECK-B-OPT-INVALID-NOT: /..//bin
|