-
Notifications
You must be signed in to change notification settings - Fork 558
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
clang-cl.exe
incompatible with passing both -E
and -showIncludes
#246
Comments
That's a bummer. I guess we should just bail early with a |
That would be unfortunate, since CMake / GN + Ninja builds always pass It seems like the only solution in this case would be to raise this issue on the LLVM bug tracker and contribute a fix to |
I submitted a patch to clang, which makes |
… /E, /EP or /P This replicates 'cl.exe' behavior and allows for both preprocessor output and dependency information to be extraced with a single compiler invocation. This is especially useful for compiler caching with tools like Mozilla's sccache. See: mozilla/sccache#246 Patch By: fxb Differential Revision: https://reviews.llvm.org/D46394 git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@331533 91177308-0d34-0410-b5e6-96231b3b80d8
My patch has now landed in clang trunk (https://reviews.llvm.org/rC331533). |
… /E, /EP or /P This replicates 'cl.exe' behavior and allows for both preprocessor output and dependency information to be extraced with a single compiler invocation. This is especially useful for compiler caching with tools like Mozilla's sccache. See: mozilla/sccache#246 Patch By: fxb Differential Revision: https://reviews.llvm.org/D46394 llvm-svn=331533
Currently sccache is unable to cache compilations that pass
-showIncludes
when usingclang-cl.exe
.Compilations fail with the following error:
clang-cl.exe: error: argument unused during compilation: '--show-includes' [-Werror,-Wunused-command-line-argument]
This is caused by sccache passing both
-E
and-showIncludes
toclang-cl.exe
with the expectation that-E
output will be on stdout and-showIncludes
output will be on stderr (See: msvc.rs#L120). Howeverclang-cl.exe
outputs both on stdout, so this combination of flags is currently not supported (See: lib/Driver/ToolChains/Clang.cpp#L5080).The text was updated successfully, but these errors were encountered: