Link libz statically into art host tools
ART host tools like hiddenapi and dex2oat are included in ART's module
SDK. To prevent missing shared library errors when building with the
prebuilt ART module sdk, statically include the libz dependency.
This reintroduces the ODR violation detected by ASAN on host, because
something loads libz-host.so there even when it's linked statically
into the binary, which tend to show up as `profman` crashes in ART ASAN
host tests (although all binaries are likely just as susceptible). To
work around that we need to make the ODR violation check more lenient
with detect_odr_violation=1 (i.e. allow violations where the variable
sizes are the same).
Flag: EXEMPT bugfix
Test: b/437408772#comment8
Bug: 437408772
Change-Id: Ic7f84ad0bc2d536ce3c5ffeade06433bf3df9c66
3 files changed