Skip to content

[libc++] Expand Android libc++ test config files #142846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libcxx/cmake/caches/AndroidNDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ set(CMAKE_CXX_COMPILER_WORKS ON CACHE BOOL "")

# Use adb to push tests to a locally-connected device (e.g. emulator) and run
# them.
set(LIBCXX_TEST_CONFIG "llvm-libc++-android-ndk.cfg.in" CACHE STRING "")
set(LIBCXXABI_TEST_CONFIG "llvm-libc++abi-android-ndk.cfg.in" CACHE STRING "")
set(LIBCXX_TEST_CONFIG "llvm-libc++-android.cfg.in" CACHE STRING "")
set(LIBCXXABI_TEST_CONFIG "llvm-libc++abi-android.cfg.in" CACHE STRING "")
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This testing configuration handles running the test suite against LLVM's
# libc++ using adb and a libc++_shared.so library on Android.
# libc++ using adb on Android.

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

Expand Down Expand Up @@ -27,11 +27,11 @@ if re.match(r'i686-linux-android(21|22|23)$', config.target_triple):
compile_flags += ' -mstackrealign'
config.substitutions.append(('%{compile_flags}', compile_flags))

# The NDK library is called "libc++_shared.so". Use LD_LIBRARY_PATH to find
# libc++_shared.so because older Bionic dynamic loaders don't support rpath
# lookup.
# The platform library is called "libc++.so" and the NDK library is called "libc++_shared.so".
# Use LD_LIBRARY_PATH to find the libcxx shared object because older Bionic dynamic loaders
# don't support rpath lookup.
config.substitutions.append(('%{link_flags}',
'-nostdlib++ -L %{lib-dir} -lc++_shared'
'-nostdlib++ -L %{lib-dir} -l@LIBCXX_SHARED_OUTPUT_NAME@'
))
config.substitutions.append(('%{exec}',
'%{executor}' +
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This testing configuration handles running the test suite against LLVM's
# libc++abi using adb and a libc++_shared.so library on Android.
# libc++abi using adb on Android.

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

Expand All @@ -19,12 +19,12 @@ config.substitutions.append(('%{compile_flags}',
'-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'
))

# The NDK library is called "libc++_shared.so". Use LD_LIBRARY_PATH to find
# libc++_shared.so because older Bionic dynamic loaders don't support rpath
# lookup. The Android libc++ shared library exports libc++abi, so we don't need
# to link with -lc++abi.
# The platform library is called "libc++.so" and the NDK library is called "libc++_shared.so".
# Use LD_LIBRARY_PATH to find the libcxx shared object because older Bionic dynamic loaders
# don't support rpath lookup. The Android libc++ shared library exports libc++abi, so we
# don't need to link with -lc++abi.
config.substitutions.append(('%{link_flags}',
'-nostdlib++ -L %{lib} -lc++_shared'
'-nostdlib++ -L %{lib} -l@LIBCXX_SHARED_OUTPUT_NAME@'
))
config.substitutions.append(('%{exec}',
'%{executor}' +
Expand Down
Loading