Fix clash of gcc toolchains in driver regression tests
authorKarl-Johan Karlsson <karl-johan.karlsson@ericsson.com>
Tue, 7 Aug 2018 08:10:33 +0000 (08:10 +0000)
committerKarl-Johan Karlsson <karl-johan.karlsson@ericsson.com>
Tue, 7 Aug 2018 08:10:33 +0000 (08:10 +0000)
commitd51f702f228c66e222859efec3486693179f0399
tree96726c944e00bfd0352b48b2002e417d6f8df35a
parenta2ddddfd3eebc7b54af776383ef16f1ef8e5e3fa
Fix clash of gcc toolchains in driver regression tests

For some regression tests the path to the right toolchain is specified
using the -sysroot switch. However, if clang was configured with a
custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the
equivalent configure command), the path to the custom gcc toolchain path
takes precedence to the one specified by sysroot. This causes several
regression tests to fail as they will be using an unexpected path. This
patch fixes this issue by adding --gcc-toolchain='' to all tests that
rely on that. The empty string causes the driver to pick the path from
sysroot instead.

This patch contain the same kind of fixes as done in rC225182

llvm-svn: 339112
clang/test/Driver/linux-header-search.cpp
clang/test/Driver/linux-ld.c