[cfe-dev] Building Clang - which source files are included in libraries?

Kevin Funk kfunk at kde.org
Sat Jul 25 10:00:00 PDT 2015


On Saturday 25 July 2015 14:43:34 Russell Wallace wrote:
> As I understand it, most of the modules that comprise the clang executable
> (even when we talk about the clang-specific modules, apart from those that
> are part of llvm in general) are actually in the clang libraries. Which is
> useful because other programs that need front-end functionality can just
> link those libraries.
> 
> Which source files are /not/ incorporated into the clang libraries? I'm
> guessing C:\llvm\tools\clang\tools\driver\driver.cpp is one such file
> because it contains a main function; would this be correct? What about the
> other two source files in that directory, cc1_main.cpp and cc1as_main.cpp;
> are they in libraries? Are there any others that aren't?
> 
> Is there somewhere I should have looked for the answer to questions like
> this? I tried generating and examining msbuild.log, but it's on the verbose
> side (over thirty megabytes) so it's not easy to see exactly what's going
> on.

Well, you'll have to have a look at the CMake files or the one of the build 
system files it generates.

What about reading the build.ninja files (very simple, easy to read)?

Generate with 'cmake -G Ninja ...', then read build.ninja. With a bit of 
pattern matching you could figure out which source files are /not/ part of 
libraries.

Hope that helps,
Cheers

-- 
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150725/e9e394c8/attachment.sig>


More information about the cfe-dev mailing list