Support building libjnigraphics on the host
Bug: 169137236
Test: SANITIZE_HOST=address make imagedecoder_fuzzer
Along with a change in frameworks/base
(I0ffc4e90b4083db79fbb12012e2e1284206b43e3), this will make it possible
to run imagedecoder_fuzzer on the host, for faster fuzzing.
imagedecoder.h:
- define __ANDROID_API__ and __INTRODUCED_IN on non-Android systems, so
methods can be called on those systems.
bitmap.h:
- define __ANDROID_API__ and __INTRODUCED_IN on non-Android systems, so
methods can be called on those systems.
- include <stddef.h>, which is needed on non-Android systems for size_t.
- on Android, unguard types and enums for easier opportunistic usage via
dlsym.
nativewindow/Android.bp
- make libnativewindow_headers host_supported, so that libjnigraphics
can access android/data_space.h
Change-Id: Iefdb4132d6f10f9164be85f4dc6e11883f6fd37e
diff --git a/libs/nativewindow/Android.bp b/libs/nativewindow/Android.bp
index 07e5d86..3011dcc 100644
--- a/libs/nativewindow/Android.bp
+++ b/libs/nativewindow/Android.bp
@@ -28,6 +28,7 @@
// TODO(b/153609531): remove when no longer needed.
native_bridge_supported: true,
min_sdk_version: "29",
+ host_supported: true,
}
ndk_library {