-
Notifications
You must be signed in to change notification settings - Fork 100
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 support for optional sccache in build system #1177
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a good call to not put it into the container so there are for sure no unexpected side effects.
Can you explain what the point is of this vs simply not calling make clean
? cmake/rust already have incremental builds.
--host=${CMAKE_SYSTEM_PROCESSOR}-none-eabi --build=${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu) | ||
--host=${CMAKE_SYSTEM_PROCESSOR}-none-eabi | ||
--build=${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu | ||
"$<$<BOOL:${CMAKE_C_COMPILER_LAUNCHER}>:CC=${CMAKE_C_COMPILER_LAUNCHER} ${CMAKE_C_COMPILER}>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't cmake automatically prepend/use the CMAKE_C_COMPILER_LAUNCHER? why is this line necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those flags are used during configuration of autotools projects like libwally. The way to enable a compiler wrapper there is to set CC="sccache gcc"
when calling ./configure
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to know - pls add a comment 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind, i thought we were in a different CMakeLists.txt. It's in external/, so that's clear enough.
Sometimes when I jump back and forth between branches it rebuilts almost everything. And before pushing I would like to be able to call Especially when I'm dealing with cmake dependencies. I don't trust cmake so I do make clean between biulds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
--host=${CMAKE_SYSTEM_PROCESSOR}-none-eabi --build=${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu) | ||
--host=${CMAKE_SYSTEM_PROCESSOR}-none-eabi | ||
--build=${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu | ||
"$<$<BOOL:${CMAKE_C_COMPILER_LAUNCHER}>:CC=${CMAKE_C_COMPILER_LAUNCHER} ${CMAKE_C_COMPILER}>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to know - pls add a comment 😄
sccache is a binary cache that wraps all calls to gcc/rustc and caches build output in
~/.cache
. This speeds up a build aftermake clean
by about 3x. I choose not to put it in the dev dockerfile by default since caching might have unexpected side effects? But I put documentation in the build docs of how to install it.