[clang-tools-extra] r318327 - [clangd] Try to unbreak tests on PS4 by targeting PC explicitly
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 15 11:38:09 PST 2017
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=*/"");
More information about the cfe-commits
mailing list