You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Android Building
Hi~
It is quite difficult to find information about handling Android.bp files.
Does anyone know how to add an additional Boolean flag to a module in a local Android.bp (e.g. bionic/libdl/Android.bp) and this newly added flag can be examined true/false when being parsed (e.g. at TransformSourceToObj function in build/soong/cc/builder.go where local flags from Android.bp files are parsed and constructed) ?
Your time and help is greatly appreciated in advance.
cheers,
Min
Colin Cross
unread,
Aug 2, 2017, 5:18:59 PM8/2/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-...@googlegroups.com
Can you describe more about the flag you are trying to add? It would
probably go in BaseCompilerProperties in build/soong/cc/compiler.go,
then be parsed in baseCompiler.compilerFlags into a something that is
passed to the compiler in TransformSourceToObj.
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Android Building
Hi Colin,
Thanks for your time.
For example, I want to add a flag (local_flag) like the following in the bionic/libdl/Android.bp:
And when the module's flags are being parsed (for example in TransformSourceToObj function or other places where more appropriate), the local_flag can be examined in order to decide whether to add a additional flag or not as the following:
So that the "some compiler flag" can be appended to the cflags iff the module's local_flag is set to true.