yrnkrn / zapcc

zapcc is a caching C++ compiler based on clang, designed to perform faster compilations
Other
1.25k stars 60 forks source link

What changes has zapcc made to upstream llvm/clang? #43

Open c0d3st0rm opened 4 years ago

c0d3st0rm commented 4 years ago

In an effort to better understand how zapcc is constructed, what changes (specifically, what elements and files of llvm/clang are modified) are made to enable zapcc's caching functionality (except for the addition of zapcc/zapccs in the tools directory)?

yrnkrn commented 4 years ago

There are many changes across the LLVM/clang codebase to enable caching and unloading. diff LLVM r325000 and zapcc to see them.

c0d3st0rm commented 4 years ago

I tried that, and I got a multi-million line 100MB diff - is https://github.com/llvm-mirror/llvm/commit/1a38f4851fe55b6b5c20b5744baf75ffe5900e9c the correct commit? Is zapcc reformatted with clang-format or any similar tools, compared to the llvm repo?

yrnkrn commented 4 years ago

This looks like the right commit. Developing zapcc we were very careful to minimize the diff which was much smaller than 100MB, about 300KB if I recall correctly.

We were using the official (back then) subversion repository. It is now on https://github.com/llvm/llvm-project while https://github.com/llvm-mirror was set prior to LLVM moving to github. These do not explain a 100MB diff size. Maybe directory structure or EOL are different?

c0d3st0rm commented 4 years ago

Directory structure looks to be the same, but I'll check the EOLs (although I'm not sure if those would affect a patch). I thought 100MB was a bit large. Did zapcc only touch llvm/clang, so I can ignore any other projects/libraries?

yrnkrn commented 4 years ago

Yes, only the LLVM and clang were modified.

c0d3st0rm commented 4 years ago

Even after a clang-format, I'm still seeing a 100MB diff - not sure what I'm doing wrong here.