diff options
author | Sam McCall <sam.mccall@gmail.com> | 2017-11-15 19:38:09 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2017-11-15 19:38:09 +0000 |
commit | cea22cf9b0cafa9df2b13190606216b6ed536714 (patch) | |
tree | ed8c6f340c5185397fcc2585c42510ae5cef9652 /clangd/GlobalCompilationDatabase.cpp | |
parent | c7cc328c675cfccfe883c8a55b0ec226aecbcee1 (diff) |
[clangd] Try to unbreak tests on PS4 by targeting PC explicitly
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@318327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clangd/GlobalCompilationDatabase.cpp')
-rw-r--r-- | clangd/GlobalCompilationDatabase.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clangd/GlobalCompilationDatabase.cpp b/clangd/GlobalCompilationDatabase.cpp index 1db3e66a..fb99b825 100644 --- a/clangd/GlobalCompilationDatabase.cpp +++ b/clangd/GlobalCompilationDatabase.cpp @@ -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=*/""); |