I am writing Android.bp file for one of the prebuild library. In Android.mk It was possible to add CFlags for prebuilt library; however same is not working in case of blueprint i.e. Android.bp. A snippet of what I am doing is below:
cc_prebuilt_library_shared {
name: "samplelib",
vendor_available:true,
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
tags: [
"optional",
"eng",
"debug",
],
target: {
android_x86:{
srcs: ["bin/x86/samplelib.so"],
compile_multilib: "32",
relative_install_path: "lib",
},
android_x86_64:{
srcs: ["bin/x86_64/samplelib.so"],
compile_multilib: "64",
relative_install_path: "lib64",
},
},
}
However I am getting following error:
/Android.bp:5:11: unrecognized property "cflags"
So if I understand correctly, cflags can't be used with cc_prebuilt_library_shared module; if that's the case how can we enable CFlags for this module then ?