Merge "Build libjnigraphics, imagedecoder_fuzzer on host"
This commit is contained in:
committed by
Android (Google) Code Review
commit
e2abb20e2b
@@ -22,22 +22,20 @@ cc_library_shared {
|
||||
"-Wunreachable-code",
|
||||
],
|
||||
|
||||
// our source files
|
||||
//
|
||||
srcs: [
|
||||
"aassetstreamadaptor.cpp",
|
||||
"bitmap.cpp",
|
||||
"imagedecoder.cpp",
|
||||
],
|
||||
|
||||
shared_libs: [
|
||||
"libandroid",
|
||||
"libandroid_runtime",
|
||||
"libhwui",
|
||||
"liblog",
|
||||
],
|
||||
|
||||
header_libs: [ "libhwui_internal_headers" ],
|
||||
header_libs: [
|
||||
"libhwui_internal_headers",
|
||||
"jni_headers",
|
||||
],
|
||||
|
||||
static_libs: ["libarect"],
|
||||
|
||||
@@ -48,7 +46,24 @@ cc_library_shared {
|
||||
ldflags: ["-Wl,--hash-style=both"],
|
||||
},
|
||||
},
|
||||
version_script: "libjnigraphics.map.txt",
|
||||
host_supported: true,
|
||||
target: {
|
||||
android: {
|
||||
srcs: [
|
||||
"aassetstreamadaptor.cpp",
|
||||
"bitmap.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"libandroid",
|
||||
],
|
||||
version_script: "libjnigraphics.map.txt",
|
||||
},
|
||||
host: {
|
||||
header_libs: [
|
||||
"libnativewindow_headers",
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// The headers module is in frameworks/native/Android.bp.
|
||||
@@ -71,6 +86,10 @@ cc_fuzz {
|
||||
static_libs: ["libarect"],
|
||||
fuzz_config: {
|
||||
cc: ["scroggo@google.com"],
|
||||
asan_options: [
|
||||
"detect_odr_violation=1",
|
||||
],
|
||||
},
|
||||
corpus: ["corpus/*"],
|
||||
host_supported: true,
|
||||
}
|
||||
|
||||
@@ -121,8 +121,12 @@ int AImageDecoder_createFromAAsset(AAsset* asset, AImageDecoder** outDecoder) {
|
||||
}
|
||||
*outDecoder = nullptr;
|
||||
|
||||
#ifdef __ANDROID__
|
||||
auto stream = std::make_unique<AAssetStreamAdaptor>(asset);
|
||||
return createFromStream(std::move(stream), outDecoder);
|
||||
#else
|
||||
return ANDROID_IMAGE_DECODER_INTERNAL_ERROR;
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool isSeekable(int descriptor) {
|
||||
|
||||
Reference in New Issue
Block a user