Copy the android_crosstool_top into the host configuration.
If we don't do that, the host configuration still uses the default
value, despite the invocation policy we apply internally.
--
MOS_MIGRATED_REVID=115986998
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java
index d29a57f..d3755b3 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java
@@ -189,6 +189,13 @@
labelMap.put("android_sdk", sdk);
}
+ @Override
+ public FragmentOptions getHost(boolean fallback) {
+ Options host = (Options) super.getHost(fallback);
+ host.androidCrosstoolTop = androidCrosstoolTop;
+ return host;
+ }
+
// This method is here because Constants.ANDROID_DEFAULT_FAT_APK_CPUS cannot be a constant
// because we replace the class file in the .jar after compilation. However, that means that we
// cannot use it as an attribute value in an annotation.