Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`
When testing clang that has been compiled with `-DDEFAULT_SYSROOT` set to some path,
some tests would fail. Override sysroot to be empty string for the tests to succeed
when clang is configured with `DEFAULT_SYSROOT`.
Differential Revision: https://reviews.llvm.org/D66834
Patch by Sergej Jaskiewicz <jaskiewiczs@icloud.com>.
llvm-svn: 373147
diff --git a/clang/unittests/Driver/ToolChainTest.cpp b/clang/unittests/Driver/ToolChainTest.cpp
index 80938c8..f84e508 100644
--- a/clang/unittests/Driver/ToolChainTest.cpp
+++ b/clang/unittests/Driver/ToolChainTest.cpp
@@ -60,7 +60,7 @@
llvm::MemoryBuffer::getMemBuffer("\n"));
std::unique_ptr<Compilation> C(TheDriver.BuildCompilation(
- {"-fsyntax-only", "--gcc-toolchain=", "foo.cpp"}));
+ {"-fsyntax-only", "--gcc-toolchain=", "--sysroot=", "foo.cpp"}));
EXPECT_TRUE(C);
std::string S;