Add CXX version to precompiled header name#1171
Conversation
|
Note: to really have this work well, we need stan-dev/math#2922 |
rok-cesnovar
left a comment
There was a problem hiding this comment.
Approving but lets way until we have the math PR in. Really hoping this works.
Great idea!!
|
@rok-cesnovar - CI passed for this. Is there any more testing we can do? Maybe try building with a system that has multiple versions of clang installed? |
|
I ran this on a system that has both clang-11 and clang-12:
Cleaning up works great as well. The only question I have is:
|
One question which might help answer that is "Can you run that same experiment against There's a related question which is "could/should we be doing more?", which I'm less confident about. If we really wanted to we could try to put the compiler patch version (e.g. 12.0.x) in there as well |
|
On develop it failed with: So I agree, this is an improvement and lets merge it as is. We will see if a patch version is needed once this fix is out in the wild. |
This idea was discussed with @rok-cesnovar here: roualdes/bridgestan#151 (comment)
Submisison Checklist
./runCmdStanTests.py src/testSummary:
This adds
CXX_MAJORandCXX_MINORto the name of the precompiled header file when it is enabled. The goal is to prevent the annoying errors from clang updates etc.Intended Effect:
Prevent clang updates from breaking PCH builds, see cmdstanpy issues
How to Verify:
Side Effects:
This could lead to several PCHs being made over time if the user doesn't run a
make clean-allevery now and then. This could cause the directory size to increase over time for an installation.Documentation:
None
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Simons Foundation
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: