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-serviceecho
 
"module vendor.harman.tuner-service-tml missing dependencies: libTuner" && 
falsemodule vendor.harman.tuner-service-tml missing dependencies: libTuner[ 
50% 1538/3033] //bionic/libc:libc.llndk versioner preprocess 
includewarning: attempted to generate guard with empty availability: 
obsoleted = 21warning: attempted to generate guard with empty availability: 
obsoleted = 2305:36:35 ninja failed with: exit status 1*


*Please help to resolve the problem*

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/16e76c1c-f40a-47dd-af15-4052104209b4n%40googlegroups.com.

Reply via email to