[libc-commits] [PATCH] D79192: [libc] Add integration tests.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri May 1 17:17:01 PDT 2020


sivachandra added a comment.

Few high level comments and questions:

- Instead of creating a target for every entrypoint, have you considered generating a single file which:
  1. Includes all header files listed in the `api.td`.
  2. Lists `cpp:Function` pointers to all functions as required by `api.td`.

There definitely are problems that need to be solved with this approach. For example, how do you ensure all public header files are already present in the `build/.../libc/include` directory. But, the appeal of this approach is that one does not have to create explicit or implicit targets for "integration tests". There would be just one target which would test everything in one go.

- In general, I don't think we should expect that internal API to match the public API. For example, we might choose to give internal types names which are different from the public names. So, I think the second kind of tests you mention in your description is not required as it is restrictive.

- Using `-nostdinc` would require us to explicitly list path to the linux headers for entrypoints which depend on the linux header files, which will very likely bring all headers into the include path. Do you have any ideas on how to get around it?

- Using `-nostdlib` results in an incomplete link. For ELF, most linkers only give a warning about missing `_start` symbol, but the resulting exe is bad/incomplete. Do you have any plans to ensure that the link is complete, resulting in an exe which can be executed?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79192





More information about the libc-commits mailing list