google / prefab

Prefab is a tool for generating build system integrations for prebuilt C/C++ libraries.
https://google.github.io/prefab/
Apache License 2.0
210 stars 32 forks source link

[FR] explicit ABI split for sanitized libraries? #154

Open DanAlbert opened 2 years ago

DanAlbert commented 2 years ago

Is your feature request related to a problem? Please describe. Libraries built with ASan (and possibly other sanitizers, but I'm not as familiar with them) often need to be linked against other ASan'd libraries. Prefab doesn't have a way to ensure that.

Describe the solution you'd like abi.json could expand a new sanitizers properly such as:

sanitizers: ["address", "undefined"]

so multiple variants of the same library could be added to the module for each sanitizer variant.

Describe alternatives you've considered This could be handled with classified AARs instead. It might be the better choice to keep artifact size down, but we'd have to instead teach Gradle how to handle these relationships. The other downside is that it only helps gradle consumers. https://github.com/google/prefab/issues/150 would also need to handle it, as would any other consumers.

Another option is doing nothing. Users can manage this themselves already the same way they do for debug/release variants of libraries (either different module names or different packages).

Additional context N/A