[BUILD] Re-enable ccache by default#12839
Conversation
Previously ccache was disabled because of possible issues with hexagon. Re-enabling it to provide a best effort attempt at using it.
| list(APPEND RUNTIME_SRCS ${RUNTIME_PIPELINE_SRCS}) | ||
| endif(USE_PIPELINE_EXECUTOR) | ||
|
|
||
| #Caches the build. |
There was a problem hiding this comment.
nit: spaces after comment #
|
|
||
| if(USE_CCACHE) # True for AUTO, ON, /path/to/ccache | ||
| if(DEFINED CXX_COMPILER_LAUNCHER OR DEFINED C_COMPILER_LAUNCHER) | ||
| message(STATUS "CXX_COMPILER_LAUNCHER or C_COMPILER_LAUNCHER already defined, not using ccache") |
There was a problem hiding this comment.
should this be ERROR if USE_CCACHE is on?
| else() | ||
| message(STATUS "Didn't find the path to CCACHE, disabling ccache") | ||
| endif(CCACHE_FOUND) | ||
| elseif("${USE_CCACHE}" MATCHES ${IS_TRUE_PATTERN}) |
There was a problem hiding this comment.
possible to collapse this with the previous if case?
There was a problem hiding this comment.
I think the logic is clearer this way.
driazati
left a comment
There was a problem hiding this comment.
a couple more nits but looks fine once those are addressed
|
BTW, why not to use an external module? |
|
@KOLANICH we don't want to add any unnecessary dependencies. |
| # under the License. | ||
|
|
||
| if(USE_CCACHE) # True for AUTO, ON, /path/to/ccache | ||
| if(DEFINED CXX_COMPILER_LAUNCHER OR DEFINED C_COMPILER_LAUNCHER) |
There was a problem hiding this comment.
also have no idea how cmake works but aren't these vars supposed to have the CMAKE_ prefix everywhere?
| if(DEFINED CXX_COMPILER_LAUNCHER OR DEFINED C_COMPILER_LAUNCHER) | |
| if(DEFINED CMAKE_CXX_COMPILER_LAUNCHER OR DEFINED CMAKE_C_COMPILER_LAUNCHER) |
There was a problem hiding this comment.
https://cmake.org/cmake/help/latest/prop_tgt/LANG_COMPILER_LAUNCHER.html. It appears to be CXX_COMPILER_LAUNCHER
Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>
* [BUILD] Re-enable ccache by default Previously ccache was disabled because of possible issues with hexagon. Re-enabling it to provide a best effort attempt at using it. * set tvm_option, set variables correctly * clean up comment, fatal error if launcher is defined with USE_CCACHE=ON * add ccache to libinfo * more libinfo * add launcher to summary, move ccache to seperate file * Update cmake/utils/Summary.cmake Co-authored-by: driazati <9407960+driazati@users.noreply.github.com> * correct name for Summary.cmake Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>
Previously ccache was disabled because of possible issues with hexagon. Re-enabling it to provide a best effort attempt at using it.
@driazati @cconvey