[libcxx-commits] [PATCH] D57624: Support tests in freestanding

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 4 10:04:23 PST 2019


ldionne added a comment.

In D57624#1383452 <https://reviews.llvm.org/D57624#1383452>, @mclow.lists wrote:

> My take on this is
>
> - adding `return 0` to the end of all the tests, and changing the signature of `main` to always be `int main(int, char**)` is a simple mechanical transformation, and once we decide that we want to do that, doesn't really need review


Agreed.

> - I strongly believe that different freestanding systems will have different setup/teardown requirements that we should not try to address in the libc++ test suite, and so @jfb 's suggestion of having a different entry point that calls `main(int, char**)` is a good way to go.

I like this too, however I don't know how this interacts with tests like `test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp` that specify the build command-line explicitly:

  // RUN: %build -faligned-allocation

We'd make sure that `%build` links in the additional entry point?


Repository:
  rCXX libc++

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

https://reviews.llvm.org/D57624





More information about the libcxx-commits mailing list