diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java index 42e911842b..daf7d5b086 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java @@ -165,10 +165,13 @@ public abstract class AndroidBinary implements RuleConfiguredTargetFactory { toolchainMap.put(cpu, toolchain); } - NativeLibs nativeLibs = shouldLinkNativeDeps(ruleContext) - ? NativeLibs.fromLinkedNativeDeps(ruleContext, androidSemantics.getNativeDepsFileName(), - depsByArchitecture, toolchainMap, configurationMap) - : NativeLibs.fromPrecompiledObjects(ruleContext, depsByArchitecture); + NativeLibs nativeLibs = + NativeLibs.fromLinkedNativeDeps( + ruleContext, + androidSemantics.getNativeDepsFileName(), + depsByArchitecture, + toolchainMap, + configurationMap); // TODO(bazel-team): Resolve all the different cases of resource handling so this conditional // can go away: recompile from android_resources, and recompile from android_binary attributes. @@ -1667,19 +1670,6 @@ public abstract class AndroidBinary implements RuleConfiguredTargetFactory { } /** - * Returns whether to use NativeDepsHelper to link native dependencies. - */ - public static boolean shouldLinkNativeDeps(RuleContext ruleContext) { - TriState attributeValue = ruleContext.attributes().get( - "legacy_native_support", BuildType.TRISTATE); - if (attributeValue == TriState.AUTO) { - return !ruleContext.getFragment(AndroidConfiguration.class).getLegacyNativeSupport(); - } else { - return attributeValue == TriState.NO; - } - } - - /** * Returns the multidex mode to apply to this target. */ public static MultidexMode getMultidexMode(RuleContext ruleContext) { |