[RFC] Standalone libc++ test suite

This is a follow-up to the discussion here:

It would be useful to make the libc++ test suite usable on its own. This way, the test-suite could be configured/run without needing to build the runtime. The initial motivation for implementing this is to be able to set a different compiler for the libc++ test suite (separate from the build compiler). But, it could be useful in other scenarios too.

I’d like to get some feedback on what the design for this should be. Here is one possible design:

Would we accomplish that by means of some flags we pass to the CMake config then? Essentially some options to say, skip building the library, just stand up the test hardness (maybe with an option to control whether the libc++ specific or just standard test are included). Very roughly, that would make configuring and invoking it something like this (assuming the library isn’t the compiler search paths) IIUC:

$ cmake  -DCMAKE_CXX_COMPILER=/some/c++  -DLLVM_ENABLE_RUNTIMES=libcxx -DLIBCXX_TEST_ONLY=ON  -DLIBCXX_LIBRARY_DIR=/path/to/build/lib -DLIBCXX_HEADER_DIR=/path/to/build/include/c++/v1 -DLIBCXX_TEST_CONFIG="appropriate.cfg.in"
$ make check-cxx
1 Like