Skip to content

Support emit pch header#1647

Merged
sylvestre merged 1 commit intomozilla:mainfrom
Danielmelody:main
Mar 11, 2023
Merged

Support emit pch header#1647
sylvestre merged 1 commit intomozilla:mainfrom
Danielmelody:main

Conversation

@Danielmelody
Copy link
Copy Markdown
Contributor

No description provided.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 9, 2023

Codecov Report

Patch coverage: 47.36% and project coverage change: +0.05 🎉

Comparison is base (fd2df77) 29.70% compared to head (8e8d90d) 29.76%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1647      +/-   ##
==========================================
+ Coverage   29.70%   29.76%   +0.05%     
==========================================
  Files          49       49              
  Lines       16662    16679      +17     
  Branches     8053     8062       +9     
==========================================
+ Hits         4950     4964      +14     
+ Misses       6793     6792       -1     
- Partials     4919     4923       +4     
Impacted Files Coverage Δ
src/compiler/clang.rs 52.73% <46.66%> (-0.38%) ⬇️
src/compiler/gcc.rs 54.63% <50.00%> (+0.40%) ⬆️
src/test/utils.rs 36.36% <0.00%> (-1.02%) ⬇️
src/compiler/args.rs 61.45% <0.00%> (-0.54%) ⬇️
src/cache/cache.rs 39.32% <0.00%> (-0.38%) ⬇️
src/util.rs 35.83% <0.00%> (-0.35%) ⬇️
src/server.rs 31.27% <0.00%> (-0.31%) ⬇️
src/compiler/msvc.rs 42.66% <0.00%> (-0.14%) ⬇️
src/compiler/compiler.rs 35.82% <0.00%> (ø)
src/compiler/rust.rs 33.81% <0.00%> (+0.13%) ⬆️
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sylvestre
Copy link
Copy Markdown
Collaborator

would you have a bit more context? where do you see this flag? thanks

@Danielmelody
Copy link
Copy Markdown
Contributor Author

Danielmelody commented Mar 9, 2023

Hmm, we are using clang/clang++ on windows(not clang-cl), and using cmake to generate pch files. The compile command cmake output is just like in the test case I wrote. Except the file name changed by real file name on my disk.
The cmake command to generate this is:

target_precompile_headers(foo PRIVATE ${foo_pch_headers})

@sylvestre
Copy link
Copy Markdown
Collaborator

OK, could you please add these info in the commit message ?
thanks

While compiling pch file emited by cmake, flag --emit-pch and -x c++header should be handled
@Danielmelody
Copy link
Copy Markdown
Contributor Author

@sylvestre Just added a new line within commit message

@scorpion-26
Copy link
Copy Markdown
Contributor

This PR/commit is a bit borked. It breaks PCH compilation when using the officially documented way of just specifiying -c -x c++-header(https://releases.llvm.org/3.1/tools/clang/docs/UsersManual.html#precompiledheaders). You can see a proper explanation in the addendum of my linked issue.

tottoto pushed a commit to tottoto/sccache that referenced this pull request Feb 6, 2026
Removes a redundant clone in the `tower-service::Service::call()`
implementation, and reduces the amount of generated code. Does not break
any user facing API.
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