Extend -Bprefix functionality and make it closer to gcc. If the "prefix"
authorSimon Atanasyan <satanasyan@mips.com>
Wed, 31 Oct 2012 12:01:53 +0000 (12:01 +0000)
committerSimon Atanasyan <satanasyan@mips.com>
Wed, 31 Oct 2012 12:01:53 +0000 (12:01 +0000)
commit86bdab74688b6e3bfac37c62b7ef0644e8616b11
treebe3ceab129a49073dfc310eb1dd8cd53da89ceff
parentc914ab6e3c281827eb1623ab24e125ce5a5209a9
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
clang/lib/Driver/Driver.cpp
clang/test/Driver/B-opt.c [new file with mode: 0644]
clang/test/Driver/Inputs/B_opt_tree/dir1/i386-unknown-linux-ld [new file with mode: 0755]
clang/test/Driver/Inputs/B_opt_tree/dir1/ld [new file with mode: 0755]
clang/test/Driver/Inputs/B_opt_tree/dir2/ld [new file with mode: 0755]
clang/test/Driver/Inputs/B_opt_tree/dir3/prefix-ld [new file with mode: 0755]