From e90fd06723d368cc95debac74ecb4ab54659f24a Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Wed, 15 Nov 2017 21:33:56 +0000 Subject: [PATCH] [clangd] Revert broken r318329 and disable tests on PS4 (Clearly this is not a permanent solution) llvm-svn: 318337 --- clang-tools-extra/clangd/GlobalCompilationDatabase.cpp | 6 +----- clang-tools-extra/test/clangd/lit.local.cfg | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 clang-tools-extra/test/clangd/lit.local.cfg diff --git a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp index 4466e40..1db3e66 100644 --- a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp +++ b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp @@ -31,11 +31,7 @@ static void addExtraFlags(tooling::CompileCommand &Command, } tooling::CompileCommand getDefaultCompileCommand(PathRef File) { - // 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 CommandLine{ - "clang", "-fsyntax-only", "-target=unknown-pc-unknown", File.str()}; + std::vector CommandLine{"clang", "-fsyntax-only", File.str()}; return tooling::CompileCommand(llvm::sys::path::parent_path(File), llvm::sys::path::filename(File), CommandLine, /*Output=*/""); diff --git a/clang-tools-extra/test/clangd/lit.local.cfg b/clang-tools-extra/test/clangd/lit.local.cfg new file mode 100644 index 0000000..ef338c7 --- /dev/null +++ b/clang-tools-extra/test/clangd/lit.local.cfg @@ -0,0 +1,6 @@ +import re +# We rely on the default -std being derived from the filetype. +# PS4 sets a different -std, and many tests break. +# FIXME: make our tests less brittle instead. +if re.match(r'.*-scei-ps4', config.target_triple): + config.unsupported = True -- 2.7.4