2021-09-30 02:56:42 +08:00
|
|
|
# Testing configuration for Apple's system libc++.
|
|
|
|
#
|
|
|
|
# This configuration differs from a normal LLVM shared library configuration in
|
|
|
|
# that we must use DYLD_LIBRARY_PATH to run the tests against the just-built library,
|
|
|
|
# since Apple's libc++ has an absolute install_name.
|
|
|
|
#
|
|
|
|
# We also don't use a per-target include directory layout, so we have only one
|
|
|
|
# include directory for the libc++ headers.
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
2021-10-01 01:23:39 +08:00
|
|
|
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
|
2021-09-30 02:56:42 +08:00
|
|
|
|
|
|
|
config.substitutions.append(('%{flags}',
|
2021-10-01 01:23:39 +08:00
|
|
|
'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
|
2021-09-30 02:56:42 +08:00
|
|
|
))
|
|
|
|
config.substitutions.append(('%{compile_flags}',
|
2021-10-25 22:59:59 +08:00
|
|
|
'-nostdinc++ -isystem %{install}/include/c++/v1 -I %{libcxx}/test/support -include %{libcxx}/test/support/nasty_macros.h'
|
2021-09-30 02:56:42 +08:00
|
|
|
))
|
|
|
|
config.substitutions.append(('%{link_flags}',
|
2021-10-01 01:23:39 +08:00
|
|
|
'-nostdlib++ -L %{install}/lib -lc++'
|
2021-09-30 02:56:42 +08:00
|
|
|
))
|
|
|
|
config.substitutions.append(('%{exec}',
|
2021-10-01 01:23:39 +08:00
|
|
|
'{} %{{libcxx}}/utils/run.py --execdir %T --env DYLD_LIBRARY_PATH=%{{install}}/lib -- '.format(sys.executable)
|
2021-09-30 02:56:42 +08:00
|
|
|
))
|
|
|
|
|
2021-10-01 01:23:39 +08:00
|
|
|
import os, site
|
|
|
|
site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))
|
2021-10-23 04:15:45 +08:00
|
|
|
import libcxx.test.params, libcxx.test.newconfig
|
2021-09-30 02:56:42 +08:00
|
|
|
libcxx.test.newconfig.configure(
|
|
|
|
libcxx.test.params.DEFAULT_PARAMETERS,
|
|
|
|
libcxx.test.features.DEFAULT_FEATURES,
|
|
|
|
config,
|
|
|
|
lit_config
|
|
|
|
)
|