New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libreelec: use build project directory for ccache #433
Conversation
-100 - this would mean individual .ccache directories per build - eg. one for RPi2, one for RPI2-debug, another for Generic etc. Anyone building multiple projects (and variations of those projects) will have numerous .ccache directories (which will take up more space, not to mention be less effective). |
If this does happen, at least change CCACHE_CACHE_SIZE to something more reasonable, such as 5GB. |
Various conversations taking place; indicated a change to CCACHE_CACHE_SIZE was wanted. Lowering to a "safe" limit of 10GB for now. If we decide less or more, this commit be squashed after that change. |
I'm not keen on this. I make clean or delete a build directory reasonably often, knowing the .ccache will make the next build less painfully slow. What is the advantage of this? |
Building for RPi and Wetek Play/Core can give you false cache hits per example. The compiler command line is the same, but the kernel headers changed and you get an object file that was build for the wrong ABI. |
Oh, now I see what @popcornmix means. To put the cache dir into the build directory is wrong! |
What about Add If you're really paranoid... |
You mean the compilers for the two targets are built differently, but are named the same? |
@MilhouseVH @popcornmix I see what your saying now. $ROOT/.ccache/$PROJECT.$ARCH.$LIBREELEC_VERSION or other seems easy enough |
Next question is whether |
I'd say |
Should I add a |
Add the variant, as it's a small addition - people don't have to use it, but it might be useful as a last resort when dealing with weird build issues (particularly on the forum or github - "run make distclean and build again" etc.) |
Would it make sense to |
Definitely don't touch |
I think I've met all current conditions. |
@popcornmix: that the compilers are different, but named identically is not the problem. |
this feels wrong. what I have in my fork is ccache folders inside build directories (like build.*/.ccache) |
I suppose a per-build .ccache is the other extreme, having started with a system wide .ccache. As this PR stands, implementing a per project .ccache seems like an acceptable compromise, if it reduces the chance of compiler confusion, while still delivering some of the benefits of a shared .ccache. Users can always override CCACHE_DIR in |
to me, it makes no sense to spread temp dirs (.ccache/*) everywhere with no real benefit. but as you wish |
If you make the cache per-project it doesn't fully resolve scenarios building from branches with different kernels. A per-build cache solves that. I also value reliable build over speed of build - particularly as we start to add DevOps things behind the scenes. |
Just my opinion, but a system-wide .ccache was actually fine for most builders. This PR however is a compromise and should still be OK for most users, and may avoid some (but probably not all) issues. However I'm not entirely sure it was needed, as more advanced users building multiple different kernels can easily implement a more restrictive ccache by adding one line to $DISTRO/options. As such I don't think it would be right to implement the most restrictive (and least beneficial) form of ccache as the default (as that's where this discussion seems to be headed), as this would only benefit a small fraction of builders who should know enough to add the required line in $DISTRO/options, while penalising the majority. |
Saw this communicated elsewhere, and thought I'd take a dig at it.
Moved ccache for given project to its build.project directory.
make clean
will blow it up along with the project.No changes to current CCACHE_CACHE_SIZE="30G"