Enable arch variant properties in prebuilt_etc.

Bug: 122332178
Test: Soong unit tests + TreeHugger.
Change-Id: Ia8fab0add09478599398e8cbb703debc39f658f6
diff --git a/apex/apex.go b/apex/apex.go
index 6269868..f6cfc26 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -409,6 +409,11 @@
 				a.properties.Multilib.First.Native_shared_libs,
 				a.properties.Multilib.First.Binaries, target.String(),
 				a.getImageVariation(config))
+
+			// When multilib.* is omitted for prebuilts, it implies multilib.first.
+			ctx.AddFarVariationDependencies([]blueprint.Variation{
+				{Mutator: "arch", Variation: target.String()},
+			}, prebuiltTag, a.properties.Prebuilts...)
 		}
 
 		switch target.Arch.ArchType.Multilib {
@@ -444,10 +449,6 @@
 		{Mutator: "arch", Variation: "android_common"},
 	}, javaLibTag, a.properties.Java_libs...)
 
-	ctx.AddFarVariationDependencies([]blueprint.Variation{
-		{Mutator: "arch", Variation: "android_common"},
-	}, prebuiltTag, a.properties.Prebuilts...)
-
 	if !ctx.Config().FlattenApex() || ctx.Config().UnbundledBuild() {
 		if String(a.properties.Key) == "" {
 			ctx.ModuleErrorf("key is missing")