[clang-tools-extra] r308721 - [clangd] Specified --gcc-toolchain explicitly in VFS test.
NAKAMURA Takumi via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 3 06:03:07 PDT 2017
My builder is failing,
[ RUN ] ClangdVFSTest.SearchLibDir
/home/bb/bootstrap-clang-libcxx-lld-i686-linux/llvm-project/clang-tools-extra/unittests/clangd/ClangdTests.cpp:492:
Failure
Value of: DiagConsumer.hadErrorInLastDiags()
Actual: true
Expected: false
[ FAILED ] ClangdVFSTest.SearchLibDir (11 ms)
As a special configuration, it has CLANG_DEFAULT_CXX_STDLIB=libc++
Seems adding "-stdlib=libstdc++" in CDB.ExtraClangFlags will fix.
How do you think?
On Fri, Jul 21, 2017 at 5:21 PM Ilya Biryukov via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> Author: ibiryukov
> Date: Fri Jul 21 01:20:47 2017
> New Revision: 308721
>
> URL: http://llvm.org/viewvc/llvm-project?rev=308721&view=rev
> Log:
> [clangd] Specified --gcc-toolchain explicitly in VFS test.
>
> In order to avoid platform-specific configuration quirks.
> (Possible fix for https://bugs.llvm.org/show_bug.cgi?id=33842)
>
> Modified:
> clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp
>
> Modified: clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp?rev=308721&r1=308720&r2=308721&view=diff
>
> ==============================================================================
> --- clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp (original)
> +++ clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp Fri Jul 21
> 01:20:47 2017
> @@ -422,9 +422,9 @@ TEST_F(ClangdVFSTest, SearchLibDir) {
> MockFSProvider FS;
> ErrorCheckingDiagConsumer DiagConsumer;
> MockCompilationDatabase CDB(/*AddFreestandingFlag=*/true);
> - CDB.ExtraClangFlags.insert(
> - CDB.ExtraClangFlags.end(),
> - {"-xc++", "-target", "x86_64-linux-unknown", "-m64"});
> + CDB.ExtraClangFlags.insert(CDB.ExtraClangFlags.end(),
> + {"-xc++", "-target", "x86_64-linux-unknown",
> + "-m64", "--gcc-toolchain=/randomusr"});
> ClangdServer Server(CDB, DiagConsumer, FS,
> /*RunSynchronously=*/true);
>
> @@ -432,7 +432,7 @@ TEST_F(ClangdVFSTest, SearchLibDir) {
> SmallString<8> Version("4.9.3");
>
> // A lib dir for gcc installation
> - SmallString<64> LibDir("/usr/lib/gcc/x86_64-linux-gnu");
> + SmallString<64> LibDir("/randomusr/lib/gcc/x86_64-linux-gnu");
> llvm::sys::path::append(LibDir, Version);
>
> // Put crtbegin.o into LibDir/64 to trick clang into thinking there's a
> gcc
> @@ -441,7 +441,7 @@ TEST_F(ClangdVFSTest, SearchLibDir) {
> llvm::sys::path::append(DummyLibFile, LibDir, "64", "crtbegin.o");
> FS.Files[DummyLibFile] = "";
>
> - SmallString<64> IncludeDir("/usr/include/c++");
> + SmallString<64> IncludeDir("/randomusr/include/c++");
> llvm::sys::path::append(IncludeDir, Version);
>
> SmallString<64> StringPath;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170803/e02409c4/attachment-0001.html>
More information about the cfe-commits
mailing list