1bootstrap_go_package { 2 name: "soong-fluoride", 3 pkgPath: "android/soong/fluoride", 4 deps: [ 5 "blueprint", 6 "blueprint-pathtools", 7 "soong", 8 "soong-android", 9 "soong-cc", 10 ], 11 srcs: [ 12 "fluoride.go", 13 ], 14 pluginFor: ["soong_build"], 15} 16 17fluoride_defaults { 18 name: "libchrome_support_defaults", 19 shared_libs: ["libchrome"], 20 cflags: [ 21 "-Wall", 22 "-Wextra", 23 "-Werror", 24 ], 25 target: { 26 darwin: { 27 enabled: false, 28 }, 29 }, 30} 31 32fluoride_defaults { 33 name: "fluoride_types_defaults", 34 defaults: ["libchrome_support_defaults"], 35 cflags: [ 36 "-DEXPORT_SYMBOL=__attribute__((visibility(\"default\")))", 37 "-fvisibility=hidden", 38 // struct BT_HDR is defined as a variable-size header in a struct. 39 "-Wno-gnu-variable-sized-type-not-at-end", 40 // there are too many unused parameters in all the code. 41 "-Wno-unused-parameter", 42 "-DLOG_NDEBUG=1", 43 ], 44 conlyflags: [ 45 "-std=c99", 46 ], 47 product_variables: { 48 debuggable: { 49 cflags: [ 50 "-DBLUEDROID_DEBUG", 51 ], 52 }, 53 }, 54} 55 56fluoride_defaults { 57 name: "fluoride_defaults", 58 target: { 59 android: { 60 test_config_template: ":BluetoothTestConfigTemplate", 61 } 62 }, 63 defaults: ["fluoride_types_defaults"], 64 header_libs: ["libbluetooth_headers"], 65 shared_libs: ["libstatslog"], 66 static_libs: [ 67 "libbluetooth-types", 68 "libbt-platform-protos-lite", 69 ], 70 cpp_std: "c++17", 71 sanitize: { 72 misc_undefined: ["bounds"], 73 }, 74} 75 76// Enables code coverage for a set of source files. Must be combined with 77// "clang_coverage_bin" in order to work. See //test/gen_coverage.py for more information 78// on generating code coverage. 79cc_defaults { 80 name: "clang_file_coverage", 81 target: { 82 host: { 83 clang_cflags: [ 84 "-fprofile-instr-generate", 85 "-fcoverage-mapping", 86 ], 87 }, 88 }, 89} 90 91// Enabled code coverage on a binary. These flags allow libraries that were 92// compiled with "clang_file_coverage" to be properly linked together in 93// order to create a binary that will create a profraw file when ran. Note 94// these flags themselves don't enable code coverage for the source files 95// compiled in the binary. See //test/gen_coverage.py for more information 96// on generating code coverage. 97cc_defaults { 98 name: "clang_coverage_bin", 99 target: { 100 host: { 101 ldflags: [ 102 "-fprofile-instr-generate", 103 "-fcoverage-mapping", 104 ], 105 }, 106 }, 107} 108