Open wroyca opened 6 months ago
Yes, I can reproduce this. Appears to be specific to C since the same example but for C++ does the right thing. Will look, thanks.
Ok, this turned out to be a Clang bug: https://github.com/llvm/llvm-project/issues/77589
The only workaround that I can think of is to write the dependency information into a temporary file rather than stdout
and only act upon it if Clang exists with 0 status. But that's both inefficient and more involved, so let's see what the Clang folks say.
Build2 doesn't propagate Clang C diagnostics in situations where some files are not found with \<angled> includes. Instead, it returns
error: inconsistent C compiler behavior
.Example:
Running the command manually, we get the proper diagnostic:
Note that GCC works well when faced with the same situation: