Skip to content

Conversation

@vhscampos
Copy link
Member

LLVM's CMake system offers an off-the-shelf detection and enablement of ccache in its builds: LLVM_CCACHE_BUILD.

This patch replaces our manually written mechanism by the one that LLVM offers.

LLVM's CMake system offers an off-the-shelf detection and enablement of
ccache in its builds: LLVM_CCACHE_BUILD.

This patch replaces our manually written mechanism by the one that LLVM
offers.
Copy link
Collaborator

@ostannard ostannard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@statham-arm
Copy link
Collaborator

What's the effect of this on subsidiary builds like libc and libc++? I guess neither method would pass through a request to use ccache, so this doesn't make anything worse?

Copy link
Collaborator

@statham-arm statham-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... yes, discussing this elsewhere, we think that ccache was not used for library builds, before or after this change. So I'm happy that this is an unconditional improvement.

(@vhscampos also points out that ccache may do the wrong thing if the compiler has changed, so that if you're rebuilding the whole toolchain, you don't want to ccache the library builds. So that might have been a deliberate choice, although it doesn't suit everybody -- library developers who aren't constantly changing the compiler would probably prefer more ccache.)

@dcandler
Copy link
Collaborator

Our CMake did originally use the LLVM_CCACHE_BUILD option, but it was going to be deprecated: https://discourse.llvm.org/t/llvm-ccache-build-is-deprecated/68431, which led to us removing it: #196

The upstream removal of the option was reverted to give more time for notice, and I'm not sure if it will still happen, but the motivation behind it remains. In particular LLVM_CCACHE_BUILD is only an on/off option and doesn't allow for different programs, which is why it was felt it was better to use the options built into CMake rather than a custom solution in LLVM.

@vhscampos
Copy link
Member Author

Thanks. Since LLVM_CCACHE_BUILD is in the path of deprecation, there's no point in this PR.

@vhscampos vhscampos closed this Oct 28, 2024
@vhscampos vhscampos deleted the llvm-ccache-build branch October 28, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants