Why does a header library need another module to be compiled first? It's not actually compiling anything. I'm assuming you actually want to export the dependencies that generated some header files? Depending on the full compilation of a dependency will cause your builds to be more linear (and thus slower).
If you're generating headers, adding them to LOCAL_GENERATED_SOURCES will add the appropriate dependencies. They need to be in the proper location in order for the include directories to be handled anyways. There is LOCAL_EXPORT_C_INCLUDE_DEPS, but unless you're doing something really weird, you shouldn't need to do that. If you're just re-exporting another module's generated header files, that module should be setting up the exported dependencies, and we'll automatically pass those along. In Soong, this is a bit more standardized, as you're rarely writing the explicit rules. Anything that looks like a genrule (implements SourceFileGenerator <https://android.googlesource.com/platform/build/soong/+/master/genrule/genrule.go#58>) can be used in generated_headers / export_generated_headers: cc_library_headers { name: "my_header_library", ... generated_headers: ["my_genrule_type_module"], export_generated_headers: ["my_genrule_type_module"], } - Dan On Wed, Oct 16, 2019 at 9:58 AM Vinayak Soni <[email protected]> wrote: > Hi, > > Suppose my header library depends on another module to be compiled first. > For other modules, you can add LOCAL_ADDITIONAL_DEPENDENCIES but that does > not work for HEADER_LIBRARIES. Is there a way this can be done? > > TIA, > Vinayak > > -- > -- > 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/8735b4b2-0a0c-4a0c-a422-88d2b5037330%40googlegroups.com > <https://groups.google.com/d/msgid/android-building/8735b4b2-0a0c-4a0c-a422-88d2b5037330%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- 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/CALQgHd%3DGrwTMkzQt1BdJB%2BjPJqZnyDjBo-QvfqNc_4Vfr3wZMA%40mail.gmail.com.
