41 lines · plain
1# This testing configuration handles running the test suite against LLVM's2# libc++abi using adb on Android.3 4lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')5 6import re7import site8 9site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))10 11import libcxx.test.android12import libcxx.test.config13import libcxx.test.params14 15config.substitutions.append(('%{flags}',16 '--sysroot @CMAKE_SYSROOT@' if '@CMAKE_SYSROOT@' else ''17))18config.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'20))21 22# The platform library is called "libc++.so" and the NDK library is called "libc++_shared.so". 23# Use LD_LIBRARY_PATH to find the libcxx shared object because older Bionic dynamic loaders 24# don't support rpath lookup. The Android libc++ shared library exports libc++abi, so we 25# don't need to link with -lc++abi.26config.substitutions.append(('%{link_flags}',27 '-nostdlib++ -L %{lib} -l@LIBCXX_SHARED_OUTPUT_NAME@'28))29config.substitutions.append(('%{exec}',30 '%{executor}' +31 ' --job-limit-socket ' + libcxx.test.android.adb_job_limit_socket() +32 ' --prepend-path-env LD_LIBRARY_PATH /data/local/tmp/libc++ --execdir %{temp} -- '33))34 35libcxx.test.config.configure(36 libcxx.test.params.DEFAULT_PARAMETERS,37 libcxx.test.features.DEFAULT_FEATURES,38 config,39 lit_config40)41