aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCory Barker <cobark@google.com>2022-06-30 17:38:35 +0000
committerCory Barker <cobark@google.com>2022-06-30 17:38:35 +0000
commite3addb8f747bd33c4906e6e76710252fe4c61758 (patch)
treee9487b9a0b7bade14c4e9e8b413c0b00c9325234
parent847ac5692118e01eeef0f0d0b2bc27e69db469a5 (diff)
downloadAFLplusplus-e3addb8f747bd33c4906e6e76710252fe4c61758.tar.gz
Removed failing and dead build targets, and added new fixed old build targets
Change-Id: I919753289f5cc98a12c5b41c6943d0b8e9fa666b
-rw-r--r--Android.bp318
1 files changed, 15 insertions, 303 deletions
diff --git a/Android.bp b/Android.bp
index ac1d5cb6..9a19a758 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,19 +1,14 @@
-//
-// NOTE: This file is outdated. None of the AFL++ team uses Android hence
-// we need users to keep this updated.
-// In the current state it will likely fail, please send fixes!
-// Also, this should build frida_mode.
-//
-
cc_defaults {
name: "afl-defaults",
-
+ export_include_dirs: [
+ "include",
+ "instrumentation",
+ ],
local_include_dirs: [
"include",
"instrumentation",
],
-
cflags: [
"-flto=full",
"-funroll-loops",
@@ -27,15 +22,14 @@ cc_defaults {
"-DAFL_LLVM_USE_TRACE_PC=1",
"-DBIN_PATH=\"out/host/linux-x86/bin\"",
"-DDOC_PATH=\"out/host/linux-x86/shared/doc/afl\"",
- "-D__USE_GNU",
"-DDEBUG_BUILD",
"-U_FORTIFY_SOURCE",
"-ggdb3",
"-g",
"-O0",
- "-fno-omit-frame-pointer",
+ "-fno-omit-frame-pointer",
"-fPIC",
- ],
+ ],
target: {
android_arm64: {
@@ -63,11 +57,10 @@ cc_defaults {
cc_binary {
name: "afl-fuzz",
+ host_supported: true,
sanitize: {
never: true,
},
- host_supported: true,
- compile_multilib: "64",
defaults: [
"afl-defaults",
@@ -100,319 +93,38 @@ cc_binary {
],
}
-cc_binary {
- name: "afl-tmin",
- static_executable: true,
- host_supported: true,
-
- defaults: [
- "afl-defaults",
- ],
-
- srcs: [
- "src/afl-tmin.c",
- "src/afl-common.c",
- "src/afl-sharedmem.c",
- "src/afl-forkserver.c",
- "src/afl-performance.c",
- ],
-}
-
-cc_binary {
- name: "afl-analyze",
- static_executable: true,
- host_supported: true,
-
- defaults: [
- "afl-defaults",
- ],
-
- srcs: [
- "src/afl-analyze.c",
- "src/afl-common.c",
- "src/afl-sharedmem.c",
- "src/afl-performance.c",
- ],
-}
-
-cc_binary {
- name: "afl-gotcpu",
- static_executable: true,
+cc_object {
+ name: "aflpp_driver",
host_supported: true,
-
- defaults: [
- "afl-defaults",
- ],
-
- srcs: [
- "src/afl-gotcpu.c",
- "src/afl-common.c",
- ],
-}
-
-cc_binary_host {
- name: "afl-cc",
- static_executable: true,
-
- defaults: [
- "afl-defaults",
- ],
-
- cflags: [
- "-DAFL_PATH=\"out/host/linux-x86/lib64\"",
- "-DAFL_CLANG_FLTO=\"-flto=full\"",
- "-DUSE_BINDIR=1",
- "-DLLVM_BINDIR=\"prebuilts/clang/host/linux-x86/clang-r383902b/bin\"",
- "-DLLVM_LIBDIR=\"prebuilts/clang/host/linux-x86/clang-r383902b/lib64\"",
- "-DCLANGPP_BIN=\"prebuilts/clang/host/linux-x86/clang-r383902b/bin/clang++\"",
- "-DAFL_REAL_LD=\"prebuilts/clang/host/linux-x86/clang-r383902b/bin/ld.lld\"",
- "-DLLVM_LTO=1",
- "-DLLVM_MAJOR=11",
- "-DLLVM_MINOR=2",
- ],
-
srcs: [
- "src/afl-cc.c",
- "src/afl-common.c",
- ],
-
- symlinks: [
- "afl-clang-fast",
- "afl-clang-fast++",
+ "utils/aflpp_driver/aflpp_driver.c",
],
+ defaults: ["afl-defaults"],
}
-cc_library_static {
+cc_object {
name: "afl-compiler-rt",
- compile_multilib: "64",
vendor_available: true,
host_supported: true,
- recovery_available: true,
- sdk_version: "9",
-
- apex_available: [
- "com.android.adbd",
- "com.android.appsearch",
- "com.android.art",
- "com.android.bluetooth.updatable",
- "com.android.cellbroadcast",
- "com.android.conscrypt",
- "com.android.extservices",
- "com.android.cronet",
- "com.android.neuralnetworks",
- "com.android.media",
- "com.android.media.swcodec",
- "com.android.mediaprovider",
- "com.android.permission",
- "com.android.runtime",
- "com.android.resolv",
- "com.android.tethering",
- "com.android.wifi",
- "com.android.sdkext",
- "com.android.os.statsd",
- "//any",
- ],
-
- defaults: [
- "afl-defaults",
+ cflags: [
+ "-fPIC",
],
-
srcs: [
"instrumentation/afl-compiler-rt.o.c",
],
+ defaults: ["afl-defaults"],
}
cc_library_headers {
name: "libafl_headers",
vendor_available: true,
host_supported: true,
-
export_include_dirs: [
"include",
"instrumentation",
],
}
-/*
-cc_prebuilt_library_static {
- name: "libfrida-gum",
- compile_multilib: "64",
- strip: {
- none: true,
- },
-
- srcs: [
- "utils/afl_frida/android/libfrida-gum.a",
- ],
-
- export_include_dirs: [
- "utils/afl_frida/android",
- ],
-}
-
-cc_library_shared {
- name: "libtestinstr",
-
- srcs: [
- "utils/afl_frida/libtestinstr.c",
- ],
-
- cflags: [
- "-O0",
- "-fPIC",
- ],
-}
-
-cc_binary {
- name: "afl-frida",
- compile_multilib: "64",
-
- defaults: [
- "afl-defaults",
- ],
-
- cflags: [
- "-g",
- "-O0",
- "-Wno-format",
- "-Wno-pointer-sign",
- "-fpermissive",
- "-fPIC",
- ],
-
- static_libs: [
- "afl-compiler-rt",
- "libfrida-gum",
- ],
-
- shared_libs: [
- "libdl",
- "liblog",
- ],
-
- srcs: [
- "utils/afl_frida/afl-frida.c",
- ],
-
- local_include_dirs: [
- "utils/afl_frida",
- "utils/afl_frida/android",
- ],
-}
-*/
-
-cc_binary {
- name: "afl-fuzz-32",
- sanitize: {
- never: true,
- },
- host_supported: true,
- compile_multilib: "32",
-
- defaults: [
- "afl-defaults",
- ],
-
- srcs: [
- "src/afl-fuzz*.c",
- "src/afl-common.c",
- "src/afl-sharedmem.c",
- "src/afl-forkserver.c",
- "src/afl-performance.c",
- ],
-}
-
-cc_binary_host {
- name: "afl-cc-32",
- compile_multilib: "32",
- static_executable: true,
-
- defaults: [
- "afl-defaults",
- ],
-
- cflags: [
- "-DAFL_PATH=\"out/host/linux-x86/lib64\"",
- "-DAFL_CLANG_FLTO=\"-flto=full\"",
- "-DUSE_BINDIR=1",
- "-DLLVM_BINDIR=\"prebuilts/clang/host/linux-x86/clang-r383902b/bin\"",
- "-DLLVM_LIBDIR=\"prebuilts/clang/host/linux-x86/clang-r383902b/lib64\"",
- "-DCLANGPP_BIN=\"prebuilts/clang/host/linux-x86/clang-r383902b/bin/clang++\"",
- "-DAFL_REAL_LD=\"prebuilts/clang/host/linux-x86/clang-r383902b/bin/ld.lld\"",
- "-DLLVM_LTO=1",
- "-DLLVM_MAJOR=11",
- "-DLLVM_MINOR=2",
- ],
-
- srcs: [
- "src/afl-cc.c",
- "src/afl-common.c",
- ],
-
- symlinks: [
- "afl-clang-fast-32",
- "afl-clang-fast++-32",
- ],
-}
-
-cc_library_static {
- name: "afl-compiler-rt-32",
- compile_multilib: "32",
- vendor_available: true,
- host_supported: true,
- recovery_available: true,
- sdk_version: "9",
-
- apex_available: [
- "com.android.adbd",
- "com.android.appsearch",
- "com.android.art",
- "com.android.bluetooth.updatable",
- "com.android.cellbroadcast",
- "com.android.conscrypt",
- "com.android.extservices",
- "com.android.cronet",
- "com.android.neuralnetworks",
- "com.android.media",
- "com.android.media.swcodec",
- "com.android.mediaprovider",
- "com.android.permission",
- "com.android.runtime",
- "com.android.resolv",
- "com.android.tethering",
- "com.android.wifi",
- "com.android.sdkext",
- "com.android.os.statsd",
- "//any",
- ],
-
- defaults: [
- "afl-defaults",
- ],
-
- srcs: [
- "instrumentation/afl-compiler-rt.o.c",
- ],
-}
-
-/*
-cc_prebuilt_library_static {
- name: "libfrida-gum-32",
- compile_multilib: "32",
- strip: {
- none: true,
- },
-
- srcs: [
- "utils/afl_frida/android/arm/libfrida-gum.a",
- ],
-
- export_include_dirs: [
- "utils/afl_frida/android/arm",
- ],
-}
-*/
-
subdirs = [
"custom_mutators",
]