Index: libcxx/test/configs/ibm-libc++-shared.cfg.in =================================================================== --- libcxx/test/configs/ibm-libc++-shared.cfg.in +++ libcxx/test/configs/ibm-libc++-shared.cfg.in @@ -4,6 +4,13 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') +import subprocess, re +# Add the AIX version to the triple here because there currently isn't a good +# way to retrieve the AIX version in the driver. +os_cmd = "oslevel -s | awk -F\'-\' \'{printf \"%.1f.%d.%d\", $1/1000, $2, $3}\'" +os_version = subprocess.run(os_cmd, capture_output=True, shell=True).stdout.decode() +config.target_triple=re.sub('aix', 'aix' + os_version, config.target_triple) + config.substitutions.append(('%{flags}', '-pthread')) config.substitutions.append(('%{compile_flags}', '-nostdinc++ -D__LIBC_NO_CPP_MATH_OVERLOADS__ -I %{include} -I %{libcxx}/test/support' Index: libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in =================================================================== --- libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in +++ libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in @@ -2,6 +2,13 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') +import subprocess, re +# Add the AIX version to the triple here because there currently isn't a good +# way to retrieve the AIX version in the driver. +os_cmd = "oslevel -s | awk -F\'-\' \'{printf \"%.1f.%d.%d\", $1/1000, $2, $3}\'" +os_version = subprocess.run(os_cmd, capture_output=True, shell=True).stdout.decode() +config.target_triple=re.sub('aix', 'aix' + os_version, config.target_triple) + config.substitutions.append(('%{flags}','')) config.substitutions.append(('%{compile_flags}', '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} ' + Index: libunwind/test/configs/ibm-libunwind-shared.cfg.in =================================================================== --- libunwind/test/configs/ibm-libunwind-shared.cfg.in +++ libunwind/test/configs/ibm-libunwind-shared.cfg.in @@ -3,6 +3,13 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') +import subprocess, re +# Add the AIX version to the triple here because there currently isn't a good +# way to retrieve the AIX version in the driver. +os_cmd = "oslevel -s | awk -F\'-\' \'{printf \"%.1f.%d.%d\", $1/1000, $2, $3}\'" +os_version = subprocess.run(os_cmd, capture_output=True, shell=True).stdout.decode() +config.target_triple=re.sub('aix', 'aix' + os_version, config.target_triple) + config.substitutions.append(('%{flags}', '')) config.substitutions.append(('%{compile_flags}', '-nostdinc++ -I %{include}' Index: libunwind/test/signal_frame.pass.cpp =================================================================== --- libunwind/test/signal_frame.pass.cpp +++ libunwind/test/signal_frame.pass.cpp @@ -19,7 +19,7 @@ // The AIX assembler does not support CFI directives, which // are necessary to run this test. -// UNSUPPORTED: target=powerpc{{(64)?}}-ibm-aix +// UNSUPPORTED: target={{.*}}-aix{{.*}} // Windows doesn't generally use CFI directives. However, i686 // mingw targets do use DWARF (where CFI directives are supported).