-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Build system: Codegen messages are noisy #836
Comments
It appears that ninja filters the output of cl in https://github.com/ninja-build/ninja/blob/master/src/clparser.cc: // static
bool CLParser::FilterInputFilename(string line) {
transform(line.begin(), line.end(), line.begin(), ToLowerASCII);
// TODO: other extensions, like .asm?
return EndsWith(line, ".c") ||
EndsWith(line, ".cc") ||
EndsWith(line, ".cxx") ||
EndsWith(line, ".cpp");
} then (in } else if (FilterInputFilename(line)) {
// Drop it.
// TODO: if we support compiling multiple output files in a single
// cl.exe invocation, we should stash the filename.
} else { |
Ah, so it should be possible to add additional filtering! Awesome. |
I don't think it's easy for ninja to add filters, because the messages emitted by cl is localized, which means ninja needs hundreds of filters to omit that message. It's eaiser to change code of the compiler, I think. |
Honestly it may be useful to implement silence option for CL as well, and then skip heuristic from ninja side for a compiler that supports it... |
@barcharcraz observed that if we get an option from the compiler back-end, we should notify CMake or contribute a change, because CMake could pass that option when creating projects. |
Thanks @orgads - I see that https://gitlab.kitware.com/cmake/cmake/-/issues/21422 was fixed by https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5492 and should be available in CMake 3.20.0. So awesome! 😸 |
Right, I forgot to update here. Sorry. |
No problem - I’m happy that you set this in motion for when we get a new CMake version via VS. 🎉 |
Building the STL prints:
All of these
Creating library
,Generating code
, andFinished generating code
messages are noisy. They also interruptninja
's progress reporting.ninja
to suppress these messages?ninja
to suppress these messages? (I observe that the MSVC compiler front-end ordinarily likes to printmeow.cpp
when it compiles a file, yet that isn't appearing here - is that somehow being suppressed, and could that suppression be extended to codegen/linker messages?)/silent
compiler option? (For compatibility reasons, it's presumably not possible to change the behavior of/nologo
.) I can even see where theGenerating code
/Finished generating code
messages are being printed in the compiler's source code, so this shouldn't be too hard to implement.The text was updated successfully, but these errors were encountered: