]> granicus.if.org Git - clang/commit
Driver: -ccc-install-dir should affect cc1 -resource-dir
authorJim Grosbach <grosbach@apple.com>
Tue, 12 Mar 2013 20:17:58 +0000 (20:17 +0000)
committerJim Grosbach <grosbach@apple.com>
Tue, 12 Mar 2013 20:17:58 +0000 (20:17 +0000)
commit61d16c1f491f5ad6d4a254dcca8868acb5f150cc
treec8e18ed2f705da883d2975633cc77a96e2ad2539
parent327a6d9cbeb8cad648084df1ee43f2e9d7dc8296
Driver: -ccc-install-dir should affect cc1 -resource-dir

-ccc-install-dir is supposed to cause the compiler to behave as-if it
were installed in the indicated location. It almost does, but misses
anything that's relying on the resource directory (libc++ header search,
in particular). The resource dir is resolved too early, before command
line args are handled.

The fix is simply to move handling of the resource dir until after we
know if a -ccc-install-dir is present.

rdar://13402696

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176894 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Driver.cpp
test/Driver/resource-dir.cpp [new file with mode: 0644]