-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add sccache #161
base: branch/22.08
Are you sure you want to change the base?
Add sccache #161
Conversation
Started test build 108930 |
Build 108930 successful
|
Oh! And instead of copying the binary, you can probably do something like this:
Or even take this another step and set environment variables globally for Cargo, instead of per-module with module-specific paths.
|
Forgot to mention why in the last example I set Here's one example (requires GCC 12.1+):
Another example, if you have a musl-based toolchain, and you're statically linking applications (of course not going to work with this extension, but will with this one):
|
Any opinion about this? I already have my own sccache extension, so I can deal without this, but I would prefer to avoid adding code that optionally depends on private SDK extension to Flathub packaging of applications. |
Hi, thanks for the PR! Sorry I didn't saw it sooner. Looks like good stuff, and we can merge it. Could you rebase the branch and update to the latest releases if any? Would also be nice to move the setup documentation from this PR comments into some readme file for how to do this. And I am assuming sccache will only get used if you've setup the wrapper and env vars and it won't affect existing projects, right? |
While Flatpak Builder doesn't make it easy, it's possible to take advantage of sccache for local builds with local storage cache, but still have the packaging work correctly with Flathub CI.
/run/ccache
, so our sccache folder will also be accessible.$XDG_CACHE_HOME/sccache -> $CCACHE_DIR/sccache
to not break this for the host, or update the relevant environment variables.