llvm-project/clang/test/Driver/Inputs
Simon Atanasyan 08450bd55c Supports Sourcery CodeBench Mips toolchain directories tree.
Sourcery CodeBench and modern FSF Mips toolchains require a bit more
complicated algorithm to calculate headers, libraries and sysroot paths
than implemented by Clang driver now. The main problem is that all these
paths depend on a set of command line arguments additionally to a target
triple value. For example, let $TC is a toolchain installation directory.
If we compile big-endian 32-bit mips code, crtbegin.o is in the
$TC/lib/gcc/mips-linux-gnu/4.7.2 folder and the toolchain's linker requires
--sysroot=$TC/mips-linux-gnu/libc argument. If we compile little-endian
32-bit soft-float mips code, crtbegin.o is in the
$TC/lib/gcc/mips-linux-gnu/4.7.2/soft-float/el folder and the toolchain's
linker requires --sysroot=$TC/mips-linux-gnu/libc/soft-float/el argument.

1. Calculate MultiarchSuffix using all necessary command line options and
   use this MultiarchSuffix to detect crtbegin.o location in the
   GCCInstallationDetector::ScanLibDirForGCCTriple() routine.
2. If a user does not provide --sysroot argument to the driver explicitly,
   calculate new sysroot value based on command line options. Then use this
   calculated sysroot path:
   a. To populate a file search paths list in the Linux::Linux() constructor.
   b. To find Mips toolchain specific include headers directories
      in the Linux::AddClangSystemIncludeArgs() routine.
   c. To provide -–sysroot argument for a linker.

Note:
- The FSF's tree slightly differs (folder names) and is not supported
  yet.
- New addExternCSystemIncludeIfExits() routine is a temporary solution.
  I plan to move path existence check to the addExternCSystemInclude()
  routine by a separate commit.

The patch reviewed by Rafael Espindola.
http://llvm-reviews.chandlerc.com/D644

llvm-svn: 179934
2013-04-20 08:15:03 +00:00
..
B_opt_tree Extend -Bprefix functionality and make it closer to gcc. If the "prefix" 2012-10-31 12:01:53 +00:00
basic_android_tree Revert r169557. It seems that the test is too restricted 2012-12-06 23:40:31 +00:00
basic_freebsd64_tree Reintroduce r148981 with significantly improved regression test. Now it 2012-01-26 01:35:15 +00:00
basic_freebsd_tree Reintroduce r148981 with significantly improved regression test. Now it 2012-01-26 01:35:15 +00:00
basic_linux_tree Beef up the testing of our 'ld' invocation on linux to cover static 2013-03-04 01:27:49 +00:00
debian_6_mips_tree Do not use "lib32" directory to create a library/object files 2012-09-14 11:27:24 +00:00
debian_multiarch_tree MIPS: Add tests to check the debian multiarch stuff for mips and mipsel targets. 2012-04-26 08:35:58 +00:00
fake_install_tree Use the InstalledDir correctly, and test it correctly as well. =/ Should 2011-10-05 06:38:03 +00:00
fedora_18_tree Add driver support for fedora 18 on ARM. 2013-04-14 10:14:21 +00:00
freescale_ppc64_tree Add the freescale_ppc64_tree that should have been included in r164177. 2012-09-18 22:53:24 +00:00
freescale_ppc_tree Add C/C++ header locations for the Freescale SDK. 2012-09-18 22:25:07 +00:00
gcc_version_parsing1 Enhance the GCC version parsing and comparison logic to handle some more 2011-11-05 23:24:30 +00:00
gcc_version_parsing2 Enhance the GCC version parsing and comparison logic to handle some more 2011-11-05 23:24:30 +00:00
gcc_version_parsing3 Enhance the GCC version parsing and comparison logic to handle some more 2011-11-05 23:24:30 +00:00
gcc_version_parsing4 Enhance the GCC version parsing and comparison logic to handle some more 2011-11-05 23:24:30 +00:00
hexagon_tree Hexagon TC: Reimplement Link::ConstructJob to call 2012-12-06 15:46:07 +00:00
mips_cs_tree Supports Sourcery CodeBench Mips toolchain directories tree. 2013-04-20 08:15:03 +00:00
montavista_i686_tree/usr/lib/gcc/i686-montavista-linux/4.2.0 supply a simple-minded testcase for r156813, to check whether the embedded montavista gcc toolchain is recognized 2012-05-30 09:56:26 +00:00
multiarch_freebsd64_tree Reintroduce r148981 with significantly improved regression test. Now it 2012-01-26 01:35:15 +00:00
multilib_32bit_linux_tree Enable generic multilib support on 32bit hosts. Previously this was only 2011-10-03 09:00:50 +00:00
multilib_64bit_linux_tree Test a multilib setup on a 64-bit host. This is the far more common 2011-10-03 09:08:26 +00:00
prefixed_tools_tree Revert part of r148839 and keep DefaultTargetTriple in the form adjusted 2012-02-22 19:15:16 +00:00
resource_dir/lib/linux If a .syms file is available alongside a sanitizer runtime, pass it to the 2013-03-23 00:30:08 +00:00
suse_10.3_ppc64_tree add tree test for suse on ppc64 (r146142) 2011-12-08 20:36:19 +00:00
ubuntu_11.04_multiarch_tree Fix an issue that Duncan discovered on a specific (no longer current) 2011-11-09 03:46:20 +00:00
ubuntu_12.04_LTS_multiarch_tree Add two more .keep files to avoid the missing of empty folders in git repository. 2012-07-31 10:52:55 +00:00
ubuntu_13.04_multiarch_tree Driver: add support for new style multiarch in Ubuntu 13.04 2013-03-06 17:14:05 +00:00
lit.local.cfg Create clang/test/Driver/lit.local.cfg. 2013-01-25 05:09:37 +00:00