aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/NativeLibs.java
diff options
context:
space:
mode:
authorGravatar Yun Peng <pcloudy@google.com>2016-08-02 08:39:01 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2016-08-02 11:15:44 +0000
commitcd7329ac63fd08ba8f914c138117128eb28a5891 (patch)
tree0bc33f30b8b0f630295f6ba370f69968c20761b4 /src/main/java/com/google/devtools/build/lib/rules/android/NativeLibs.java
parentc352b148106d2fdafa6e988db6d351f953a896ed (diff)
*** Reason for rollback *** This change causes android_integration_test failing on Mac. *** Original change description *** 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. -- MOS_MIGRATED_REVID=129074607
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/NativeLibs.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/NativeLibs.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/NativeLibs.java b/src/main/java/com/google/devtools/build/lib/rules/android/NativeLibs.java
index 7c3c8def89..fc736ae5e1 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/NativeLibs.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/NativeLibs.java
@@ -34,12 +34,14 @@ import com.google.devtools.build.lib.rules.cpp.CppFileTypes;
import com.google.devtools.build.lib.rules.cpp.LinkerInput;
import com.google.devtools.build.lib.rules.nativedeps.NativeDepsHelper;
import com.google.devtools.build.lib.vfs.PathFragment;
+
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
+
import javax.annotation.Nullable;
/** Represents the collection of native libraries (.so) to be installed in the APK. */
@@ -69,11 +71,8 @@ public final class NativeLibs {
Map<String, Iterable<Artifact>> result = new LinkedHashMap<>();
for (Map.Entry<String, Collection<TransitiveInfoCollection>> entry :
depsByArchitecture.asMap().entrySet()) {
- CcLinkParams linkParams =
- AndroidCommon.getCcLinkParamsStore(
- entry.getValue(),
- ImmutableList.of("-Wl,-soname=lib" + ruleContext.getLabel().getName()))
- .get(/* linkingStatically */ true, /* linkShared */ true);
+ CcLinkParams linkParams = AndroidCommon.getCcLinkParamsStore(entry.getValue())
+ .get(/* linkingStatically */ true, /* linkShared */ true);
Artifact nativeDepsLibrary = NativeDepsHelper.maybeCreateAndroidNativeDepsAction(
ruleContext, linkParams, configurationMap.get(entry.getKey()),