[clang-tools-extra] r291892 - Fix the build of the include-fixer plugin for some shared cmake builds and MSVC.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 13 02:14:08 PST 2017
Author: d0k
Date: Fri Jan 13 04:14:07 2017
New Revision: 291892
URL: http://llvm.org/viewvc/llvm-project?rev=291892&view=rev
Log:
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.
Modified:
clang-tools-extra/trunk/include-fixer/SymbolIndexManager.h
clang-tools-extra/trunk/include-fixer/plugin/CMakeLists.txt
Modified: clang-tools-extra/trunk/include-fixer/SymbolIndexManager.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/include-fixer/SymbolIndexManager.h?rev=291892&r1=291891&r2=291892&view=diff
==============================================================================
--- clang-tools-extra/trunk/include-fixer/SymbolIndexManager.h (original)
+++ clang-tools-extra/trunk/include-fixer/SymbolIndexManager.h Fri Jan 13 04:14:07 2017
@@ -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 {
Modified: clang-tools-extra/trunk/include-fixer/plugin/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/include-fixer/plugin/CMakeLists.txt?rev=291892&r1=291891&r2=291892&view=diff
==============================================================================
--- clang-tools-extra/trunk/include-fixer/plugin/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/include-fixer/plugin/CMakeLists.txt Fri Jan 13 04:14:07 2017
@@ -9,4 +9,5 @@ add_clang_library(clangIncludeFixerPlugi
clangParse
clangSema
clangTooling
+ ${PTHREAD_LIB}
)
More information about the cfe-commits
mailing list