diff options
| author | Simon Atanasyan <satanasyan@mips.com> | 2012-10-31 12:01:53 +0000 |
|---|---|---|
| committer | Simon Atanasyan <satanasyan@mips.com> | 2012-10-31 12:01:53 +0000 |
| commit | 86bdab74688b6e3bfac37c62b7ef0644e8616b11 (patch) | |
| tree | be3ceab129a49073dfc310eb1dd8cd53da89ceff /clang/test | |
| parent | c914ab6e3c281827eb1623ab24e125ce5a5209a9 (diff) | |
| download | bcm5719-llvm-86bdab74688b6e3bfac37c62b7ef0644e8616b11.tar.gz bcm5719-llvm-86bdab74688b6e3bfac37c62b7ef0644e8616b11.zip | |
Extend -Bprefix functionality and make it closer to gcc. If the "prefix"
is not a directory, Driver::GetProgramPath() routine does not try to append
the program name as a "path component" to it. It just joins the "prefix" with
the program name and checks the resulting path existence.
The patch reviewed by Rafael Espindola.
llvm-svn: 167114
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Driver/B-opt.c | 22 | ||||
| -rwxr-xr-x | clang/test/Driver/Inputs/B_opt_tree/dir1/i386-unknown-linux-ld | 0 | ||||
| -rwxr-xr-x | clang/test/Driver/Inputs/B_opt_tree/dir1/ld | 0 | ||||
| -rwxr-xr-x | clang/test/Driver/Inputs/B_opt_tree/dir2/ld | 0 | ||||
| -rwxr-xr-x | clang/test/Driver/Inputs/B_opt_tree/dir3/prefix-ld | 0 |
5 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/Driver/B-opt.c b/clang/test/Driver/B-opt.c new file mode 100644 index 00000000000..a0b9a11162d --- /dev/null +++ b/clang/test/Driver/B-opt.c @@ -0,0 +1,22 @@ +// Check -B driver option. +// +// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \ +// RUN: -B %S/Inputs/B_opt_tree/dir1 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-B-OPT-TRIPLE %s +// CHECK-B-OPT-TRIPLE: "{{.*}}/Inputs/B_opt_tree/dir1/i386-unknown-linux-ld" +// +// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \ +// RUN: -B %S/Inputs/B_opt_tree/dir2 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-B-OPT-DIR %s +// CHECK-B-OPT-DIR: "{{.*}}/Inputs/B_opt_tree/dir2/ld" +// +// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \ +// RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-B-OPT-PREFIX %s +// CHECK-B-OPT-PREFIX: "{{.*}}/Inputs/B_opt_tree/dir3/prefix-ld" +// +// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \ +// RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- \ +// RUN: -B %S/Inputs/B_opt_tree/dir2 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-B-OPT-MULT %s +// CHECK-B-OPT-MULT: "{{.*}}/Inputs/B_opt_tree/dir3/prefix-ld" diff --git a/clang/test/Driver/Inputs/B_opt_tree/dir1/i386-unknown-linux-ld b/clang/test/Driver/Inputs/B_opt_tree/dir1/i386-unknown-linux-ld new file mode 100755 index 00000000000..e69de29bb2d --- /dev/null +++ b/clang/test/Driver/Inputs/B_opt_tree/dir1/i386-unknown-linux-ld diff --git a/clang/test/Driver/Inputs/B_opt_tree/dir1/ld b/clang/test/Driver/Inputs/B_opt_tree/dir1/ld new file mode 100755 index 00000000000..e69de29bb2d --- /dev/null +++ b/clang/test/Driver/Inputs/B_opt_tree/dir1/ld diff --git a/clang/test/Driver/Inputs/B_opt_tree/dir2/ld b/clang/test/Driver/Inputs/B_opt_tree/dir2/ld new file mode 100755 index 00000000000..e69de29bb2d --- /dev/null +++ b/clang/test/Driver/Inputs/B_opt_tree/dir2/ld diff --git a/clang/test/Driver/Inputs/B_opt_tree/dir3/prefix-ld b/clang/test/Driver/Inputs/B_opt_tree/dir3/prefix-ld new file mode 100755 index 00000000000..e69de29bb2d --- /dev/null +++ b/clang/test/Driver/Inputs/B_opt_tree/dir3/prefix-ld |

