-
Notifications
You must be signed in to change notification settings - Fork 552
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
Support caching MSVC compiles with -showIncludes #47
Comments
Using CMake with the Ninja generator will add |
Right, that was the original motivation for this bug. Rust builds LLVM using CMake, so their compilations include |
It seems like a common way other compiler caches work, is to always add I guess a straight forward fix, as you said, would just be to strip printed includes from the preprocessor output for caching purposes, and then prepend them to the output again. Just to clarify we are on the same page. I'd be happy to help working on a fix for this issue. |
This is already an issue with sccache, #35 covers fixing it.
Yeah, that should work fine. sccache caches the compiler output, and We could implement this one of two ways--either always save the |
We currently treat
-showIncludes
as a non-cacheable MSVC option. I ported this directly from the Python implementation. Unfortunately a lot of build tools use this to produce dependency info, and it may not be possible to work around that. @alexcrichton ran into this trying to get sccache working for the LLVM build in Rust.I suspect the issue here is that the output from
-showIncludes
is generated when we run the preprocessor, but we cache the output of running the compiler on the already-preprocessed output. It might be a little weird, but I think we could save all the extra output lines and just prepend them to the compiler output if the original command included-showIncludes
.@glandium, is there anything I'm missing there?
The text was updated successfully, but these errors were encountered: