Skip to content

Commit

Permalink
Test fixes for modern static libraries.
Browse files Browse the repository at this point in the history
Unfortunately static executables with libc++ will require API > 26 to
avoid libandroid_support. Fortunately this doesn't actually cause any
issues except in the case of having a static executable in the same
project as other non-static executable modules.

Test: ./run_tests.py
Bug: http://b/24507500
Bug: android/ndk#593
Change-Id: I925dac426a41326c76bddec691ba8ce227ba5370
(cherry picked from commit d0dd54a20855dcb9cfdcda2c129edf1e4d2f42bb)
  • Loading branch information
DanAlbert committed Feb 13, 2018
1 parent 6b607b1 commit 4523043
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APP_PLATFORM := android-21
18 changes: 12 additions & 6 deletions tests/device/static-executable-exceptions/test_config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
def run_broken(abi, _device_api, toolchain, _subtest):
if abi == 'armeabi-v7a':
# __gnu_Unwind_Find_exidx has always been broken in libc.a. We need an
# update to the static libraries to fix this.
return abi, 'https://github.com/android-ndk/ndk/issues/593'
def extra_cmake_flags():
# Clang does the right thing if you provide `-pie -static`, but GCC throws
# an error.
return ['-DANDROID_PIE=OFF']

return None, None

def build_unsupported(_abi, api, _toolchain):
# Static executables with libc++ require targeting a new enough API level
# to not need libandroid_support.
if api < 21:
return 'android-{}'.format(api)

return None
4 changes: 0 additions & 4 deletions tests/device/wait/test_config.py

This file was deleted.

0 comments on commit 4523043

Please sign in to comment.