Hi
I am trying to use cc_prebuilt_library_shared for shared library. In that SRC i want to use as conditional. so for this i have used cc_defaults.
Android.bp
tuner_presctrl_common_SharedLib_preset {
name: "tuner_presctrl_common_SharedLib_preset"
}
cc_prebuilt_library_shared {
name: "libTuner",
defaults : ["tuner_presctrl_common_SharedLib_preset"],
compile_multilib: "64",
proprietary: true,
strip: {
none: true
},
}
GO file
func frame_SharedLib_SRCS(ctx android.BaseContext) ([] string) {
var srcs []string
var TUNER_BUILD_TARGET = ctx.AConfig().Getenv("TARGET_PRODUCT")
srcs = append(srcs, "device/" + TUNER_BUILD_TARGET + "/etc/libTuner.so")
return srcs
}
func myPrebuiltSharedLib(ctx android.LoadHookContext) {
type props struct {
Srcs []string
}
p := &props{}
p.Srcs = frame_SharedLib_SRCS(ctx)
fmt.Printf("Shared Lib path is... %s\n", p.Srcs)
ctx.AppendProperties(p)
}
func myPrebuiltzSharedLibFactory() android.Module {
module := cc.DefaultsFactory()
android.AddLoadHook(module, myPrebuiltSharedLib)
return module
}
func init() {
android.RegisterModuleType("tuner_presctrl_common_SharedLib_preset", myPrebuiltzSharedLibFactory)
}
but i am getting below error:
[ 49% 1508/3033] //vendor/harman/hardware/tuner/harman_tuner_hal:vendor.harman.tuner-service-tml link vendor.harman.tuner-service
FAILED: out/soong/.intermediates/vendor/harman/hardware/tuner/harman_tuner_hal/vendor.harman.tuner-service-tml/android_vendor.30_arm64_armv8-a/vendor.harman.tuner-service
echo "module vendor.harman.tuner-service-tml missing dependencies: libTuner" && false
module vendor.harman.tuner-service-tml missing dependencies: libTuner
[ 50% 1538/3033] //bionic/libc:libc.llndk versioner preprocess include
warning: attempted to generate guard with empty availability: obsoleted = 21
warning: attempted to generate guard with empty availability: obsoleted = 23
05:36:35 ninja failed with: exit status 1
Please help to resolve the problem