Replace android.BuildOs with Config.BuildOS
Replace the android.BuildOs constant with Config.BuildOS so that it
can vary based on the product config.
Bug: 190084016
Test: all Soong tests
Change-Id: Ia67f872d8b2ab788747a22e3a9659dc21c9775cd
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index dff9543..2c78d73 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -523,14 +523,14 @@
}
// buildBootImageVariantsForBuildOs generates rules to build the boot image variants for the
-// android.BuildOs OsType, i.e. the type of OS on which the build is being running.
+// config.BuildOS OsType, i.e. the type of OS on which the build is being running.
//
// The files need to be generated into their predefined location because they are used from there
// both within Soong and outside, e.g. for ART based host side testing and also for use by some
// cloud based tools. However, they are not needed by callers of this function and so the paths do
// not need to be returned from this func, unlike the buildBootImageVariantsForAndroidOs func.
func buildBootImageVariantsForBuildOs(ctx android.ModuleContext, image *bootImageConfig, profile android.WritablePath) {
- buildBootImageForOsType(ctx, image, profile, android.BuildOs)
+ buildBootImageForOsType(ctx, image, profile, ctx.Config().BuildOS)
}
// buildBootImageForOsType takes a bootImageConfig, a profile file and an android.OsType