Files
rk35xx-android14/frameworks/av/services/audioflinger/Android.go
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

33 lines
825 B
Go

package audioflinger
import (
"android/soong/android"
"android/soong/cc"
"fmt"
)
func init() {
fmt.Println("audioflinger want to conditional Compile")
android.RegisterModuleType("cc_audioflinger", DefaultsFactory)
}
func DefaultsFactory() (android.Module) {
module := cc.DefaultsFactory()
android.AddLoadHook(module, Defaults)
return module
}
func Defaults(ctx android.LoadHookContext) {
type props struct {
Cflags []string
Shared_libs []string
}
p := &props{}
p.Cflags = getCflags(ctx)
ctx.AppendProperties(p)
}
func getCflags(ctx android.BaseContext) ([]string) {
var cppflags []string
if (ctx.AConfig().IsEnvTrue("BOARD_SUPPORT_MULTIAUDIO")) {
cppflags = append(cppflags,"-DSUPPORT_MULTIAUDIO=1")
}
return cppflags
}