[PATCH] D78771: Add dependency edges between generated headers and users

Stephen Neuendorffer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 09:43:47 PDT 2020


stephenneuendorffer added a comment.

@mehdi_amini cmake doesn't actually use clang, it apparently has it's own built-in preprocessor which scans for included files.  In poking around through various previous answers about cmake, I think there are several things going on.

1. in Ninja, cmake generates special order-only dependencies to resolve the bootstrapping of dependencies.
2. There are some comments that this is more difficult with make because make isn't intended for an included file to be updated (potentially) multiple times.  It's expected that there is a rule to generate an included dependence file once and then include it.
3. There are other comments that dependencies are correctly handled if the custom command is in the same 'directory tree' as the libraries which include it. This may avoid the problems in 2 for simple cases.

I'm going to try to build a simple reproducer.  Ultimately, the solution may be to just generate all the headers before building everything else, which means that all mlir libraries would have a dependence on all IncGen targets.  That isn't great, but I think it's better than the fix proposed in this review.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78771





More information about the llvm-commits mailing list