Page MenuHomePhabricator

[libcxx/cxxabi/unwind][AIX] Add an AIX target and config for testing.
AbandonedPublic

Authored by sfertile on May 17 2021, 8:26 AM.

Details

Reviewers
ldionne
jasonliu
xingxue
daltenty
Group Reviewers
Restricted Project
Summary

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

Event Timeline

sfertile created this revision.May 17 2021, 8:26 AM
sfertile requested review of this revision.May 17 2021, 8:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2021, 8:26 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript

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.
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.

jasonliu accepted this revision.May 28 2021, 11:26 AM

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.

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.

ldionne requested changes to this revision.Jul 1 2021, 12:14 PM

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

This revision now requires changes to proceed.Jul 1 2021, 12:14 PM
sfertile abandoned this revision.Oct 21 2021, 6:53 AM