[clang-tools-extra] r318327 - [clangd] Try to unbreak tests on PS4 by targeting PC explicitly

Alex L via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 15 11:43:03 PST 2017


This doesn't seem like a good permanent solution (as Paul pointed out -std
will change in the future). Will you be able to avoid this in the future?

On 15 November 2017 at 11:38, Sam McCall via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: sammccall
> Date: Wed Nov 15 11:38:09 2017
> New Revision: 318327
>
> URL: http://llvm.org/viewvc/llvm-project?rev=318327&view=rev
> Log:
> [clangd] Try to unbreak tests on PS4 by targeting PC explicitly
>
> Modified:
>     clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp
>
> Modified: clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp
> URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/
> GlobalCompilationDatabase.cpp?rev=318327&r1=318326&r2=318327&view=diff
> ============================================================
> ==================
> --- clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp
> (original)
> +++ clang-tools-extra/trunk/clangd/GlobalCompilationDatabase.cpp Wed Nov
> 15 11:38:09 2017
> @@ -31,7 +31,11 @@ static void addExtraFlags(tooling::Compi
>  }
>
>  tooling::CompileCommand getDefaultCompileCommand(PathRef File) {
> -  std::vector<std::string> CommandLine{"clang", "-fsyntax-only",
> File.str()};
> +  // We don't specify --std because we want to infer it from the filename.
> +  // We force PC because PS4 will change --std from under us.
> +  // FIXME: there must be a more principled way to do this!
> +  std::vector<std::string> CommandLine{
> +      "clang", "-fsyntax-only", "-triple=unknown-pc-unknown", File.str()};
>    return tooling::CompileCommand(llvm::sys::path::parent_path(File),
>                                   llvm::sys::path::filename(File),
> CommandLine,
>                                   /*Output=*/"");
>
>
> _______________________________________________
> 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/20171115/7e2ebf4a/attachment-0001.html>


More information about the cfe-commits mailing list