How to export $(call local-generated-sources-dir) in Android.bp?

598 views
Skip to first unread message

Chih-Wei Huang

unread,
Sep 5, 2017, 11:40:47 AM9/5/17
to Android Building
Hi,
I'd like to export the include path $(call local-generated-sources-dir) in Android.bp.
In Android.mk I can do like

LOCAL_EXPORT_C_INCLUDE_DIRS := $(call local-generated-sources-dir)

However, seems there is no counterpart in Android.bp.
I tried everything but none work.
Isn't it possible?

Colin Cross

unread,
Sep 5, 2017, 1:25:06 PM9/5/17
to android-...@googlegroups.com
Your generated headers go in a genrule (or gensrcs) module:
genrule {
name: "generated_headers_module",
}

Then you import them and reexport them from another module:
cc_library {
name: "library",
generated_headers: ["generated_headers_module"],
export_generated_headers: ["generated_headers_module"],
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> 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 android-buildi...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages