-
Notifications
You must be signed in to change notification settings - Fork 599
Properly implement PCH compilation #1802
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
Conversation
it would need tests, could you please add some? thanks |
Okay, I added some tests. Let me know if I should add another specific test. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1802 +/- ##
==========================================
+ Coverage 29.39% 29.58% +0.19%
==========================================
Files 49 49
Lines 17713 17781 +68
Branches 8547 8577 +30
==========================================
+ Hits 5206 5260 +54
- Misses 7348 7350 +2
- Partials 5159 5171 +12
☔ View full report in Codecov by Sentry. |
I force pushed to address the failing lint CI |
Language::C => "c", | ||
Language::Cxx => "c++", | ||
Language::C | Language::CHeader => "c", | ||
Language::Cxx | Language::CxxHeader => "c++", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #1748.
A proper bug explanation is provided in the above mentioned issue.
Since we need to differentiate between header and source for PCH compilation, we store the file type information (header vs source) and then pass that along to clang/gcc via
-x
. Since.h
("GenericHeader") can be either a header or a source, the-x
will be omitted for.h
unless manually specified by the user, so the compiler can decide what to do.