Add support for sccache#1475
Conversation
|
Specifically, it depends on projg2/shadowman#4 |
|
I'm thinking about how rust could be integrated: should we export |
4f1042d to
5190029
Compare
|
Can you explain what this is useful for, given the build cache issue (it keys on the full path)? Are you really using it with live ebuilds enough for it to pay off? |
I've not thought about this at all. However I have flang live installed, so yes I could benefit from that. Also I'd be interested to support rust packages, where I also have a couple of live packages installed. Not that it would matter a lot. But I can see why this might not be worth the hassle. |
|
I would personally be less concerned about "how often is it even used, and is it worth the hassle" and be more concerned about the exact opposite problem: People will use it. And it will be a bad thing that they use it. They will enable it because they think it sounds like a good thing and then they will suffer a pure loss due to the cache fullpath issue. I'm strongly against merging sccache support in any form, unless it at least answers the question of how to make sure users have a fighting chance of understanding when it's a good idea vs when it's a bad idea. Mostly indifferent as long as that is handled. One possibility of the top of my head is to make the FEATURES=sccache be ignored unless PROPERTIES=live is also set? |
|
Isn't the path issue specific to Rust? |
|
No that happens for all supported compilers |
Might be worth the rename the feature flag as well to avoid confusion from the start |
|
mozilla/sccache#35 is now fixed (mozilla/sccache#2521) so I think we can go ahead, but I guess Portage may need to set that env var? |
|
Oh wow, very neat. We should also do a version check on the sccache binary though. |
|
Would something like this work? # lib/portage/package/ebuild/doebuild.py
mysettings["SCCACHE_BASEDIRS"] = mysettings["PORTAGE_BUILDDIR"] |
|
I think so.. |
|
And perhaps explicitly add:
to the commit message, but say "This needed ..." instead for shadowman, and a link to the commit which updated the sccache ebuild. |
Nothing special. It just works |
|
This still lacks a version check for sccache, and I'm not sure, but the SCCACHE_SERVER_PORT variable is not configurable from the outside. Is that ok? |
409b7df to
6a020d5
Compare
|
Ok, so if you stop the background daemon SCCACHE_SERVER_PORT=6224 sccache --stop-serverthe next emerge process hangs at
Unsure why this happens. Also, the server seems to keep file handles from the previously compiled package open, so if you emerge 2 packages after another, the second compilation fails (similar errors for all crates). |
This needed projg2/shadowman#4 and sccache v0.14.0 or later (https://codeberg.org/gentoo/gentoo/commit/ced15048f3ace8ef22c5f2ccfd1a96aecc05f700). Signed-off-by: idealseal <realidealseal@protonmail.com>
This depends on projg2/shadowman#4 and a patched
sccacheebuild.It works exactly as the
ccacheimplementation.Docs are still missing. Maybe this can be combined with the
ccacheinstructions?