From aa39480d2107fff4c42e321616436b0b0b718cde Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Mon, 8 Jan 2024 12:55:45 +0900 Subject: Split usage of UseVndk UseVndk is a function to check if the module can use VNDK libraries, but this function was also used to check if the module is installed in the treblelized partition (vendor or product). As of VNDK deprecation, UseVndk funtion will return false even when the module is installed in vendor / product partition, so we need a separated function to check this. This change introduces a new function 'InVendorOrProduct' which replaces UseVndk based on its usage. Bug: 316829758 Test: m nothing --no-skip-soong-tests passed Change-Id: Ic61fcd16c4554c355f6005894a4519b044b27fe5 --- rust/compiler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/compiler.go') diff --git a/rust/compiler.go b/rust/compiler.go index a8c547333..c1bdbeb91 100644 --- a/rust/compiler.go +++ b/rust/compiler.go @@ -332,7 +332,7 @@ func (compiler *baseCompiler) featureFlags(ctx ModuleContext, flags Flags) Flags } func (compiler *baseCompiler) cfgFlags(ctx ModuleContext, flags Flags) Flags { - if ctx.RustModule().UseVndk() { + if ctx.RustModule().InVendorOrProduct() { compiler.Properties.Cfgs = append(compiler.Properties.Cfgs, "android_vndk") if ctx.RustModule().InVendor() { compiler.Properties.Cfgs = append(compiler.Properties.Cfgs, "android_vendor") @@ -520,7 +520,7 @@ func (compiler *baseCompiler) installDir(ctx ModuleContext) android.InstallPath dir = filepath.Join(dir, ctx.Arch().ArchType.String()) } - if compiler.location == InstallInData && ctx.RustModule().UseVndk() { + if compiler.location == InstallInData && ctx.RustModule().InVendorOrProduct() { if ctx.RustModule().InProduct() { dir = filepath.Join(dir, "product") } else if ctx.RustModule().InVendor() { -- cgit v1.2.3-59-g8ed1b