Add arch-specific directory to search path
authorPirama Arumuga Nainar <pirama@google.com>
Fri, 3 Mar 2017 23:20:49 +0000 (23:20 +0000)
committerPirama Arumuga Nainar <pirama@google.com>
Fri, 3 Mar 2017 23:20:49 +0000 (23:20 +0000)
commit65a16dd85811f385f36c8d94bb960d88dce9a6c9
tree1599cc157a227db452483a8f3093eb1cdd9cb943
parent1c9d800fbc4e6552f30bf7ad807a02126f4cf8f0
Add arch-specific directory to search path

Summary:

This change adds an arch-specific subdirectory in <ResourceDir>/lib/<OS>
to the linker search path.  This path also gets added as '-rpath' for
native compilation if a runtime is linked in as a shared object.  This
allows arch-specific libraries to be installed alongside clang.

Reviewers: danalbert, cbergstrom, javed.absar

Subscribers: srhines

Differential Revision: https://reviews.llvm.org/D30015

llvm-svn: 296927
clang/include/clang/Driver/ToolChain.h
clang/lib/Driver/ToolChain.cpp
clang/lib/Driver/Tools.cpp
clang/test/Driver/Inputs/resource_dir_with_arch_subdir/lib/linux/aarch64/.keep [new file with mode: 0644]
clang/test/Driver/Inputs/resource_dir_with_arch_subdir/lib/linux/arm/.keep [new file with mode: 0644]
clang/test/Driver/Inputs/resource_dir_with_arch_subdir/lib/linux/i386/.keep [new file with mode: 0644]
clang/test/Driver/Inputs/resource_dir_with_arch_subdir/lib/linux/x86_64/.keep [new file with mode: 0644]
clang/test/Driver/arch-specific-libdir-rpath.c [new file with mode: 0644]
clang/test/Driver/arch-specific-libdir.c [new file with mode: 0644]
clang/test/lit.cfg