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)
commit061dabf7df3f22977710eee02936b8a9de179bfb
tree737e0528c01a4bc2d88eded2e051fd3090a835c2
parent5ce24ffca242f5cdb2c2001f691f165db07517bc
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

llvm-svn: 176894
clang/lib/Driver/Driver.cpp
clang/test/Driver/resource-dir.cpp [new file with mode: 0644]