Libunwind and libcxx have cmake variables to set the additional compiler and link flags needed to build a test program. The libcxxabi were missing those flags. This patch adds 'LIBCXXABI_TEST_LINKER_FLAGS' and 'LIBCXXABI_TEST_COMPILER_FLAGS' to fill this gap.
Diff Detail
Event Timeline
We'd like to move away from going through CMake to set test-only variables, as it's not a great mechanism for doing so. Instead, please consider using a custom Lit config file like libcxx/test/configs/libcxx-trunk-shared.cfg.in, which allows you to customize how you run the test suite a lot more.
To explain my point, what we're trying to avoid is to go through CMake in order to change specific Lit parameters. It's not a great model if for each Lit-related "customization point" we have, we also need to add a CMake variable and an entry in the lit.site.cfg.in file. It leads to bloated and complicated CMake files. Instead, modifying how you run lit directly is both more powerful and simpler.
Please take a look at libcxx/test/configs/libcxx-trunk-shared.cfg.in and LIBCXX_TEST_CONFIG in CMake for how to customize exactly how you're running the test suite. This is a lot more powerful and simple than stringing options through CMake!
Thanks. I found this variable and I tried using it with an out of tree file that was customized for my target and it works. This patch though does make CMake variable set consistent in libunwind/libcxxabi/libcxx. Otherwise we will have these variables in libunwind and libcxx and not in libcxxabi. If that is not important then I can abandon this patch.
The approach to be taken for all runtime libraries is the one I described with specifying a custom config file. Please abandon!