Adds a target info for local AIX testing, and adjusts some of the link option to enable running testing on AIX for libcxx, libcxxabi and libunwind.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM on AIX perspective. 
FYI, we will need two reviewers from libc++ review group or the maintainer of libc++ project to approve before we could land.
| libcxx/utils/libcxx/test/target_info.py | ||
|---|---|---|
| 163 | Just noting that this setup only works when we use libc++/libc++abi/libunwind stack. | |
Thanks for the review Jason. @ldionne Can we get a review from you or someone else familiar with the libc++ project?
| libcxx/utils/libcxx/test/target_info.py | ||
|---|---|---|
| 163 | Valid point. I think we need to start somewhere though, and we need to enable testing in both libc++abi and libunwind on AIX so we can test Xings patches, so this is the natural first step. | |
Is there any way you folks could try to use configuration files like libcxx/test/configs/libcxx-trunk-shared.cfg.in instead of augmenting the old config.py? I'm trying to move all of the testing infrastructure over to those, since they are a lot more flexible and straightforward to define. Right now there's a bit of boilerplate in those config files, but the gist of it is that you define exactly how the compiler is to be called on the test files:
config.substitutions.append(('%{cxx}', COMPILER))
config.substitutions.append(('%{flags}',
    '-isysroot {}'.format(CMAKE_OSX_SYSROOT) if CMAKE_OSX_SYSROOT else ''
))
config.substitutions.append(('%{compile_flags}',
    '-nostdinc++ -isystem {} -I {}'.format(
        os.path.join(INSTALL_ROOT, 'include', 'c++', 'v1'),
        os.path.join(LIBCXX_ROOT, 'test', 'support'))
))
config.substitutions.append(('%{link_flags}',
    '-nostdlib++ -L {0} -lc++ -Wl,-rpath,{0} -pthread'.format(
        os.path.join(INSTALL_ROOT, 'lib'))
))
config.substitutions.append(('%{exec}',
    '{} {} --execdir %T -- '.format(
        pipes.quote(sys.executable),
        pipes.quote(runPy))
))You can see how to select your testing configuration here: https://libcxx.llvm.org/TestingLibcxx.html#using-a-custom-site-configuration
Just noting that this setup only works when we use libc++/libc++abi/libunwind stack.
In theory, libc++ could work with gcc and use what's in libstdc++ to replace libc++abi and libunwind. If that's the case, then this won't work any more. And we would need something similar to LinuxLocalTI above.
But I guess people have intention to make the above combination work could change this setup later when they needed.