diff options
author | 2016-07-27 10:53:15 -0400 | |
---|---|---|
committer | 2016-07-28 18:33:02 -0400 | |
commit | e65876a28965c72f7a48a16be3390ba7c5c97a6f (patch) | |
tree | 71d6a6a1ae3467e597eca6f21827b9b4e605cd00 /src/test/shell | |
parent | 047b0e6a2c69436544bf849dddd62792aee1b948 (diff) |
Sets SONAME on shared objects in Android binaries.
Adds a linker flag to set the internal DT_SONAME. This fixes #1578 for
SDK 24 and removes the warnings for previous SDKs. There is no need to
set the linker flag for android_librarys that depend on native code,
because the linker flag will be set by the android_binarys that depend
on that android_library.
Change-Id: I0d4fd78ffaf03c19ae3712bdeb28a52722a22f6f
Diffstat (limited to 'src/test/shell')
-rwxr-xr-x | src/test/shell/bazel/android/android_integration_test.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/shell/bazel/android/android_integration_test.sh b/src/test/shell/bazel/android/android_integration_test.sh index 38162a345e..ecd4600e40 100755 --- a/src/test/shell/bazel/android/android_integration_test.sh +++ b/src/test/shell/bazel/android/android_integration_test.sh @@ -159,6 +159,16 @@ function check_num_sos() { assert_equals "11" "$num_sos" } +function check_soname() { + soname=$(readelf -d bazel-bin/java/bazel/_dx/bin/native_symlinks/x86/libbin.so \ + | grep SONAME \ + | awk '{print substr($5,2,length($5)-2)}') + echo 'I am here' + echo "$soname" + readelf -d bazel-bin/java/bazel/_dx/bin/native_symlinks/x86/libbin.so + assert_equals "libbin" "$soname" +} + function test_sdk_library_deps() { create_new_workspace setup_android_support @@ -183,6 +193,7 @@ function test_android_binary() { bazel build -s //java/bazel:bin --fat_apk_cpu="$cpus" || fail "build failed" check_num_sos + check_soname } function test_android_binary_clang() { |