1 2subdirs = [ 3 "third_party/android/libBlocksRuntime", 4] 5 6cc_defaults { 7 name: "honggfuzz-defaults", 8 cflags: [ 9 "-D_GNU_SOURCE", 10 "-fblocks", 11 "-Wall", 12 "-Wno-initializer-overrides", 13 "-Werror", 14 "-Wframe-larger-than=131072", 15 "-D__HF_USES_CAPSTONE__", 16 "-D_HF_ARCH_LINUX", 17 ], 18 c_std: "c11", 19 clang: true, 20} 21 22cc_library_headers { 23 name: "honggfuzz_libcommon_headers", 24 export_include_dirs: ["libhfcommon"], 25} 26 27cc_library { 28 name: "honggfuzz_libcommon", 29 30 defaults: ["honggfuzz-defaults"], 31 32 header_libs: ["honggfuzz_libcommon_headers"], 33 export_header_lib_headers: ["honggfuzz_libcommon_headers"], 34 srcs: [ 35 "libhfcommon/*.c", 36 ], 37 38 39 static_libs: [ 40 "libBlocksRuntime", // -fblocks 41 ], 42} 43 44cc_library_headers { 45 name: "honggfuzz_libhfuzz_headers", 46 export_include_dirs: ["libhfuzz"], 47} 48 49cc_library { 50 name: "honggfuzz_libhfuzz", 51 defaults: ["honggfuzz-defaults"], 52 53 arch: { 54 x86: { 55 cflags: [ 56 // Suppress this performance warning for 32-bit x86. 57 "-Wno-atomic-alignment", 58 ], 59 }, 60 }, 61 62 header_libs: ["honggfuzz_libhfuzz_headers"], 63 export_header_lib_headers: ["honggfuzz_libhfuzz_headers"], 64 65 whole_static_libs: [ 66 "honggfuzz_libcommon", 67 "libBlocksRuntime", // -fblocks 68 ], 69 70 srcs: [ 71 "libhfuzz/*.c", 72 ], 73} 74 75 76 77cc_binary { 78 name: "honggfuzz", 79 defaults: ["honggfuzz-defaults"], 80 81 arch: { 82 x86: { 83 cflags: [ 84 // Suppress this performance warning for 32-bit x86. 85 "-Wno-atomic-alignment", 86 ], 87 }, 88 }, 89 90 whole_static_libs: [ 91 "honggfuzz_libcommon", 92 "libcapstone", 93 "libBlocksRuntime", // -fblocks 94 95 "libunwind_static", 96 "liblzma", // needed for libunwind 97 ], 98 99 srcs: [ 100 "*.c", 101 "linux/*.c", 102 ], 103 exclude_srcs: [ 104 "linux/bfd.c", 105 ], 106} 107 108