-
Notifications
You must be signed in to change notification settings - Fork 1
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 of precompiled headers #3
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3 +/- ##
=========================================
Coverage ? 85.89%
=========================================
Files ? 4
Lines ? 1333
Branches ? 206
=========================================
Hits ? 1145
Misses ? 137
Partials ? 51
Continue to review full report at Codecov.
|
Creating PCH file (/Yc option) works in usual way as any other object, except that it will produce meta info (stdafx.pch.clcache file) contains it's cache key as identification of headers files and it's contents. Using PCH file (/Yu option) affects /showIncludes - it not contains PCH includes, so for generating manifest hash additionally used PCH cache key. So when PCH headers or it's content changed but no changes in source file or it's headers then it will produce different cache entry.
e09b445
to
2b54b8d
Compare
ab4ea6b
to
33b2ef2
Compare
What is status of PR ? Does it work well or there are still issues or things to do ? |
Yes, clcache doesn't support precompiled headers.
I have not tested it in real developing cycle. |
What is your patch about, just generating pch files or to support /Yu in general ? |
I'm sorry that not answered on your question before, I though it is obvious from the PR title. |
I am always suspicious when title tells exactly what I want ;) Maybe I am reading too much newspapers... In that case I will cherry-pick your PR and try as I have strong feeling that dropping precompiled headers would be a problem in my development team. |
So, I was using your support for precompiled headers, it worked good so far, but today I got intro problems. Compiler started to report on few files that precompiled headers have /GT set but source/header does not. It is fact that few days ago I had /GT on some files that I removed. Is it possible that it match precompiled header file from cache but should create new one ? After I cleared cache everything compiled so I cannot reproduce it right now. I will try to reproduce it next week with minimal set of files. |
@9a4gl thanks for your feedback. You mentioned that cleared cache, but do you tried (before clearing cache) clean build (rebuild or clean + build targets)? So probably with some bug with incremental build it wont to rebuild pch file with new options. |
It actually happened on my Jenkins test node, it does build using msbuild and it does /t:clean first. I have made minimal project and tried changing /GT option and I couldn't reproduce that. |
Well, good point to start.
Do you have log of build? probably it contains some useful info. |
Hm, my tests on minimal project were only with visual studio. Will try with msbuild. Unfortunately I I do not have log anymore :( |
Creating PCH file (/Yc option) works in usual way as any other object,
except that it will produce meta info (stdafx.pch.clcache file) contains
it's cache key as identification of headers files and it's contents.
Using PCH file (/Yu option) affects /showIncludes - it not contains PCH
includes, so for generating manifest hash additionally used PCH cache key.
So when PCH headers or it's content changed but no changes in source file
or it's headers then it will produce different cache entry.