[llvm-commits] some missing clang lib deps

David Fang fang at csl.cornell.edu
Wed Dec 14 12:41:23 PST 2011

Hi all,
 	I've checked out the latest llvm/clang svn trunk and built them 
for powerpc-darwin8 using g++-4.0.1 (OS X 10.4), cmake with 
BUILD_SHARED_LIBS=ON. The attached patch is all I needed to get this 

lib/AST/ExprConstant.cpp: g++-4.0 needed a template keyword as a 
diambiguator for template member functions in some contexts.  This is not 
needed with newer compilers, but should also be permitted.

The rest of the patch adds missing dependencies between some clang 
libraries that were found during linking (undefined symbols otherwise.)
Some of the CMakeLists.txt mentioned having to fix these as a TODO.

Let me know if this patch or pieces of it are suitable for trunk.


David Fang
-------------- next part --------------
Index: lib/AST/ExprConstant.cpp
--- lib/AST/ExprConstant.cpp	(revision 146566)
+++ lib/AST/ExprConstant.cpp	(working copy)
@@ -1978,7 +1978,7 @@
     if (E->isArrow()) {
       if (!EvaluatePointer(E->getBase(), Result, this->Info))
         return false;
-      BaseTy = E->getBase()->getType()->getAs<PointerType>()->getPointeeType();
+      BaseTy = E->getBase()->getType()->template getAs<PointerType>()->getPointeeType();
     } else if (E->getBase()->isRValue()) {
       if (!EvaluateTemporary(E->getBase(), Result, this->Info))
         return false;
Index: lib/StaticAnalyzer/Frontend/CMakeLists.txt
--- lib/StaticAnalyzer/Frontend/CMakeLists.txt	(revision 146566)
+++ lib/StaticAnalyzer/Frontend/CMakeLists.txt	(working copy)
@@ -1,6 +1,6 @@
 set(LLVM_NO_RTTI 1)
-set(LLVM_USED_LIBS clangBasic clangLex clangAST clangFrontend clangRewrite)
+set(LLVM_USED_LIBS clangBasic clangLex clangAST clangFrontend clangRewrite clangStaticAnalyzerCheckers clangStaticAnalyzerCore)
 include_directories( ${CMAKE_CURRENT_BINARY_DIR}/../Checkers )
Index: lib/StaticAnalyzer/Checkers/CMakeLists.txt
--- lib/StaticAnalyzer/Checkers/CMakeLists.txt	(revision 146566)
+++ lib/StaticAnalyzer/Checkers/CMakeLists.txt	(working copy)
@@ -3,7 +3,7 @@
   SOURCE Checkers.td
   TARGET ClangSACheckers)
-set(LLVM_USED_LIBS clangBasic clangAST)
+set(LLVM_USED_LIBS clangBasic clangAST clangAnalysis clangStaticAnalyzerCore)
Index: lib/Serialization/CMakeLists.txt
--- lib/Serialization/CMakeLists.txt	(revision 146566)
+++ lib/Serialization/CMakeLists.txt	(working copy)
@@ -26,3 +26,10 @@
+  clangAST
+  clangBasic
+  clangSema
+  LLVMSupport

More information about the llvm-commits mailing list