llvm/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in

# Testing configuration for libc++abi on AIX.

lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

import lit.util
if lit.util.isAIXTriple(config.target_triple):
  # Add the AIX version to the triple here because there currently isn't a good
  # way to retrieve the AIX version in the driver.
  config.target_triple = lit.util.addAIXVersion(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} ' +
    '-D__LIBC_NO_CPP_MATH_OVERLOADS__ ' +
    '-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
    '-I %{libcxx}/test/support -pthread -I %{libcxx}/src'
))
config.substitutions.append(('%{link_flags}',
    '-nostdlib++ -L %{lib} -lc++ -lc++abi -Wl,-bbigtoc'
))
config.substitutions.append(('%{exec}',
    '%{executor} --execdir %T --env LIBPATH=%{lib} -- '
))

import os, site
site.addsitedir(os.path.join('@LIBCXXABI_LIBCXX_PATH@', 'utils'))
import libcxx.test.params, libcxx.test.config
libcxx.test.config.configure(
    libcxx.test.params.DEFAULT_PARAMETERS,
    libcxx.test.features.DEFAULT_FEATURES,
    config,
    lit_config
)