Introduce AlwaysUsePrebuiltSdks
Instead of UnbundledBuild, use AlwaysUsePrebuiltSdks
to determine if java modules needs to be built against prebuilt sdks.
And rename UnbundledBuildUsePrebuiltSdks to AlwaysUsePrebuiltSdks to
express its behavior more correctly.(It can be orthgonal to "Unbundled")
Bug: 160390776
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage
Change-Id: I0be7265c1959d8774c295372cd7a9250169f6df9
diff --git a/cc/rs.go b/cc/rs.go
index 9149e17..de3e64b 100644
--- a/cc/rs.go
+++ b/cc/rs.go
@@ -25,7 +25,7 @@
func init() {
pctx.VariableFunc("rsCmd", func(ctx android.PackageVarContext) string {
- if ctx.Config().UnbundledBuild() {
+ if ctx.Config().AlwaysUsePrebuiltSdks() {
// Use RenderScript prebuilts for unbundled builds but not PDK builds
return filepath.Join("prebuilts/sdk/tools", runtime.GOOS, "bin/llvm-rs-cc")
} else {