[llvm-commits] some missing clang lib deps
David Fang
fang at csl.cornell.edu
Wed Dec 14 13:20:28 PST 2011
> On Wed, Dec 14, 2011 at 12:41 PM, David Fang <fang at csl.cornell.edu> wrote:
>> 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
>> working.
>>
>> 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.
>
> The patch to lib/AST/ExprConstant.cpp breaks the 80-column rule, but
> otherwise seems okay.
I like that rule too.
Found it here: http://llvm.org/docs/CodingStandards.html
How does the re-attached patch look now, formatting-wise?
> I don't know enough about the CMake build system to review those bits.
--
David Fang
http://www.csl.cornell.edu/~fang/
-------------- next part --------------
Index: lib/AST/ExprConstant.cpp
===================================================================
--- lib/AST/ExprConstant.cpp (revision 146584)
+++ lib/AST/ExprConstant.cpp (working copy)
@@ -1978,7 +1978,8 @@
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 146584)
+++ 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 146584)
+++ 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)
add_clang_library(clangStaticAnalyzerCheckers
AdjustedReturnValueChecker.cpp
Index: lib/Serialization/CMakeLists.txt
===================================================================
--- lib/Serialization/CMakeLists.txt (revision 146584)
+++ lib/Serialization/CMakeLists.txt (working copy)
@@ -26,3 +26,10 @@
ClangDiagnosticSerialization
ClangDeclNodes
ClangStmtNodes)
+
+target_link_libraries(clangSerialization
+ clangAST
+ clangBasic
+ clangSema
+ LLVMSupport
+)
More information about the llvm-commits
mailing list