Stubs libs are available for host

The runtime APEX is built for host as well as for target. Therefore
stubs libs should be available also for host.

Bug: 120670568
Test: follow the repro step shown in b/120670568#comment4
Change-Id: I350fe490848ae9ceb55aade0521bdfaf48ed083f
diff --git a/cc/cc.go b/cc/cc.go
index 54d50ef..02fc239 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1107,7 +1107,7 @@
 	addSharedLibDependencies := func(depTag dependencyTag, name string, version string) {
 		var variations []blueprint.Variation
 		variations = append(variations, blueprint.Variation{Mutator: "link", Variation: "shared"})
-		versionVariantAvail := ctx.Os() == android.Android && !ctx.useVndk() && !c.inRecovery()
+		versionVariantAvail := !ctx.useVndk() && !c.inRecovery()
 		if version != "" && versionVariantAvail {
 			// Version is explicitly specified. i.e. libFoo#30
 			variations = append(variations, blueprint.Variation{Mutator: "version", Variation: version})
diff --git a/cc/library.go b/cc/library.go
index bd43043..36f3a86 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -1016,10 +1016,6 @@
 // Version mutator splits a module into the mandatory non-stubs variant
 // (which is unnamed) and zero or more stubs variants.
 func VersionMutator(mctx android.BottomUpMutatorContext) {
-	if mctx.Os() != android.Android {
-		return
-	}
-
 	if m, ok := mctx.Module().(*Module); ok && !m.inRecovery() && m.linker != nil {
 		if library, ok := m.linker.(*libraryDecorator); ok && library.buildShared() &&
 			len(library.Properties.Stubs.Versions) > 0 {