[PATCH] D60974: Clang IFSO driver action.

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 22 18:54:56 PDT 2019


compnerd added a comment.

@jakehehrlich I think you are misunderstanding this.  The intent here is to provide a means to emit just the interfaces from a library into a stub that can be used for building.  However, rather than have the interfaces be defined elsewhere, having clang run through the sources and compute the public interfaces as written means that no matter how you write your interfaces, the same set of interfaces will always be emitted into the interface library.  The "linker" literally is a merge of all the public interfaces in each translation unit.  It is important to understand that there are interfaces which may be declared in sources (yes, that is terrible, but not all software is well designed or well written unfortunately).  This means that you need to do a syntactic pass of the sources (along with the flags that you are building with) to ensure that all the public interfaces are made visible.  You can do this by a separate step of consuming the compilation database and running through each of the target's TUs, this is just a slightly different approach to that.  Once you have enumerated the public interfaces, you just emit a stub containing that set of interfaces (preserving whether it is a text or data symbol).

I'm not sure how modules play into this at all.  Yes, C++ modules could let you control some of the interfaces, but that is orthogonal to what this is meant to do.


Repository:
  rC Clang

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

https://reviews.llvm.org/D60974





More information about the cfe-commits mailing list