fpetrogalli added a comment.

In D141581#4056612 <https://reviews.llvm.org/D141581#4056612>, @barannikov88 
wrote:

> In D141581#4056503 <https://reviews.llvm.org/D141581#4056503>, @fpetrogalli 
> wrote:
>
>> This is because the sources of clangBasic and clangDriver might be compiled 
>> before LLVMTargetParser is ready.
>
> ...
>
>> Therefore, if we say that clangDriver and clangBasic depend on 
>> LLVMTargetParser we make sure that the inclusion of the tablegen-generated 
>> file resolves correctly.
>
> Sorry, I don't follow. If I read correctly, you're saying that clang 
> libraries might begin to //compile// before their DEPENDS dependency is built 
> (implying that DEPENDS clause only guarantees that the dependency is ready at 
> //link// stage). If it is true, the proposed patch changes nothing -- the 
> sources might still start to compile before cmake decides to generate inc 
> file, because it is only needed at link stage.
> Am I missing something?

Ops, yeah, I think I am wrong. In fact , when `RISCVTargetParserTableGen` is in 
the `DEPENDS`, it should be built before the clangBasic start to compile. This 
means that I actually do not know why this change fixes the issue reported 
<https://reviews.llvm.org/rGac1ffd3caca12c254e0b8c847aa8ce8e51b6cfbf>

@mgorny - can you try this patch on your workflow? Maybe the issue disappeared 
in my local machine just because for some reason it changed the order of 
compilation?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141581/new/

https://reviews.llvm.org/D141581

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to