Adding a local flag to Android.bp

113 views
Skip to first unread message

MinSeong KIM

unread,
Aug 7, 2017, 10:00:19 AM8/7/17
to Android Building
Hi~ 

Thank you for your time and efforts in advance^^

I have a question about adding a local flag to a Android.bp (e.g. bionic/libdl/Android.bp) and this newly added flag can be examined true/false when the Android.bp is read while parsing (e.g. at TransformSourceToObj function in build/soong/cc/builder.go where local flags from Android.bp files are parsed and constructed).

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.

cheers,
Min
Reply all
Reply to author
Forward
0 new messages