Build libjnigraphics, imagedecoder_fuzzer on host

Bug: 142252770
Bug: 169137236
Bug: 169139756
Test: SANITIZE_HOST=address make imagedecoder_fuzzer

This will allow running the fuzzer much faster in order to find bugs. It
also allows running with ASAN to help find memory leaks.

Some symbols (e.g. ABitmap, AAssetStreamAdaptor) rely on
Android-specific features, so disable them when building on the host.
This still allows using the core features of AImageDecoder.

This requires a change in frameworks/native
(Iefdb4132d6f10f9164be85f4dc6e11883f6fd37e).

Disable detecting ODR violations when building with ASAN (which is how
host builds are built). Without this change, the host detects the
following:

    =================================================================
    ==4072183==ERROR: AddressSanitizer: odr-violation (0x7fb7d52b4100):
      [1] size=80 'vtable for android::VectorImpl' system/core/libutils/VectorImpl.cpp
      [2] size=80 'vtable for android::VectorImpl' system/core/libutils/VectorImpl.cpp
    These globals were registered at these points:
      [1]:
        #0 0x55fefda47e0d in __asan_register_globals /out/llvm-project/compiler-rt/lib/asan/asan_globals.cpp:360:3
        #1 0x7fb7d43aa77b in asan.module_ctor (/usr/local/ssd/android/master/out/host/linux-x86/fuzz/x86_64/imagedecoder_fuzzer/../lib/libhw
ui.so+0x17c677b)

      [2]:
        #0 0x55fefda47e0d in __asan_register_globals /out/llvm-project/compiler-rt/lib/asan/asan_globals.cpp:360:3
        #1 0x7fb7d52a0e6b in asan.module_ctor (/usr/local/ssd/android/master/out/host/linux-x86/fuzz/x86_64/imagedecoder_fuzzer/../lib/libutils.so+0x3de6b)

    ==4072183==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
    SUMMARY: AddressSanitizer: odr-violation: global 'vtable for android::VectorImpl' at system/core/libutils/VectorImpl.cpp
    ==4072183==ABORTING

Change-Id: I0ffc4e90b4083db79fbb12012e2e1284206b43e3
2 files changed