Fix the build of the include-fixer plugin for some shared cmake builds and MSVC.

- The include fixer plugin does not directly depend on pthread, but can
pick up pthread references transitively through inlining. Just add
pthreads to the linked libs unconditionally.
- MSVC emits bogus warnings when including <future> and building without
exceptions. Blacklist the warnings explicitly.

llvm-svn: 291892
This commit is contained in:
Benjamin Kramer 2017-01-13 10:14:07 +00:00
parent 116bbab4e4
commit 5f1f6eceb3
2 changed files with 12 additions and 0 deletions

View File

@ -13,8 +13,19 @@
#include "SymbolIndex.h"
#include "find-all-symbols/SymbolInfo.h"
#include "llvm/ADT/StringRef.h"
#ifdef _MSC_VER
// Disable warnings from ppltasks.h transitively included by <future>.
#pragma warning(push)
#pragma warning(disable:4530)
#endif
#include <future>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
namespace clang {
namespace include_fixer {

View File

@ -9,4 +9,5 @@ add_clang_library(clangIncludeFixerPlugin
clangParse
clangSema
clangTooling
${PTHREAD_LIB}
)