-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Apple: Enable the use of ccache and other compiler cache utilities #3142
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
base: dev
Are you sure you want to change the base?
Conversation
|
Filed as internal issue #USD-9809 |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
This would be awesome - I use ccache on Linux for my OpenUSD development builds, and it helps a lot when iterating. Adding ccache support directly in the CMake files would simply our ccache setup. Also - I've recently been experimenting with sccache on Windows, and so far it's been helping / working. It does require:
In theory, you can also use ccache on windows, but MSVC is only B level / Partially Supported by ccache, whereas it's fully supported by sccache. |
|
@pmolodo good to know it can help on Windows as well. I'm curious, if debug symbols are embedded instead of in .pdb files, is there any difference in disk footprint? Or does the .o simply increase as if the pdb itself was embedded? |
|
@meshula I've rebased this PR on latest dev and added the build flags to build_usd.py It's enabled by default for macOS and Linux, but can be disabled. If it is not found, it will continue as normal but emit a message. |
Description of Change(s)
This PR adds the ability to use a compiler cacher like ccache when building USD.
This can be a huge speed boost when iterating on USD. Lee Kerley had added this internally and it's been a huge accelerant for us. It can make iterative builds take a fraction of the time, after the first build.
I control this with a boolean option
PXR_ENABLE_COMPILER_CACHEwhich is OFF by default. This would be harmless to leave on by default, but msvc is considered a secondary tier, so I turned it off.There is also
PXR_COMPILER_CACHE_NAMEwhich allows a developer to override the name of the compiler cache program. This can be useful if a team is using sccache which is a distributed version of ccache, but some larger companies sometimes have their own drop in versions of ccache.If the option is enabled and the compiler cache is not found, it just prints a status message but does not impede anything.