[clangd] Try to unbreak tests on PS4 by targeting PC explicitly

llvm-svn: 318327
This commit is contained in:
Sam McCall 2017-11-15 19:38:09 +00:00
parent dc2596e971
commit 118a7a9986
1 changed files with 5 additions and 1 deletions

View File

@ -31,7 +31,11 @@ static void addExtraFlags(tooling::CompileCommand &Command,
}
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=*/"");