[cfe-commits] [PATCH] Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration (try 2)
peter at pcc.me.uk
Tue Jun 8 09:43:26 PDT 2010
I updated my patch against the latest svn trunk. It would be great if
someone could look at applying it in the near future since this patch
seems to be quite volatile, or perhaps give a better layout suggestion.
Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen. This is suboptimal for
clients which only wish to make use of the frontend. CodeGen in
particular introduces a large number of unwanted dependencies.
This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries. The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).
After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").
N.B. This patch includes file renames which are indicated in the
patch body, or the following "svn mv" commands are required before
applying the patch:
svn mv include/clang/Frontend/PathDiagnosticClients.h include/clang/Checker/PathDiagnosticClients.h
svn mv include/clang/Frontend/BackendUtil.h include/clang/CodeGen/BackendUtil.h
svn mv include/clang/Frontend/CodeGenAction.h include/clang/CodeGen/CodeGenAction.h
svn mv include/clang/Frontend/AnalysisConsumer.h include/clang/Frontend/AnalyzerOptions.h
svn mv include/clang/Frontend/FixItRewriter.h include/clang/Rewrite/FixItRewriter.h
svn mv lib/Frontend/AnalysisConsumer.cpp lib/Checker/AnalysisConsumer.cpp
svn mv lib/Frontend/HTMLDiagnostics.cpp lib/Checker/HTMLDiagnostics.cpp
svn mv lib/Frontend/PlistDiagnostics.cpp lib/Checker/PlistDiagnostics.cpp
svn mv lib/Frontend/BackendUtil.cpp lib/CodeGen/BackendUtil.cpp
svn mv lib/Frontend/CodeGenAction.cpp lib/CodeGen/CodeGenAction.cpp
svn mv lib/Frontend/FixItRewriter.cpp lib/Rewrite/FixItRewriter.cpp
svn mv lib/Frontend/HTMLPrint.cpp lib/Rewrite/HTMLPrint.cpp
svn mv lib/Frontend/RewriteMacros.cpp lib/Rewrite/RewriteMacros.cpp
svn mv lib/Frontend/RewriteObjC.cpp lib/Rewrite/RewriteObjC.cpp
svn mv lib/Frontend/RewriteTest.cpp lib/Rewrite/RewriteTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 42075 bytes
Desc: not available
More information about the cfe-commits