1 # This testing configuration handles running the test suite against LLVM's
2 # libc++abi using adb and a libc++_shared.so library on Android.
4 lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
9 site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))
11 import libcxx.test.android
12 import libcxx.test.config
13 import libcxx.test.params
15 config.substitutions.append(('%{flags}',
16 '--sysroot @CMAKE_SYSROOT@' if '@CMAKE_SYSROOT@' else ''
18 config.substitutions.append(('%{compile_flags}',
19 '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS'
22 # The NDK library is called "libc++_shared.so". Use LD_LIBRARY_PATH to find
23 # libc++_shared.so because older Bionic dynamic loaders don't support rpath
24 # lookup. The Android libc++ shared library exports libc++abi, so we don't need
25 # to link with -lc++abi.
26 config.substitutions.append(('%{link_flags}',
27 '-nostdlib++ -L %{lib} -lc++_shared'
29 config.substitutions.append(('%{exec}',
31 ' --job-limit-socket ' + libcxx.test.android.adb_job_limit_socket() +
32 ' --prepend-path-env LD_LIBRARY_PATH /data/local/tmp/libc++ --execdir %T -- '
35 libcxx.test.config.configure(
36 libcxx.test.params.DEFAULT_PARAMETERS,
37 libcxx.test.features.DEFAULT_FEATURES,