blob: cde9a361fdcfc8f78fee9fcb2961b9e03044c7ff [file] [log] [blame]
Jack Hee2eeff42016-12-07 18:25:17 -08001bootstrap_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 {
Myles Watson65d24fb2018-02-13 10:33:54 -080018 name: "libchrome_support_defaults",
19 shared_libs: ["libchrome"],
Jack Hee2eeff42016-12-07 18:25:17 -080020 cflags: [
Jack Hee2eeff42016-12-07 18:25:17 -080021 "-Wall",
22 "-Wextra",
23 "-Werror",
Myles Watson65d24fb2018-02-13 10:33:54 -080024 ],
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",
Jack Hee2eeff42016-12-07 18:25:17 -080038 // struct BT_HDR is defined as a variable-size header in a struct.
39 "-Wno-gnu-variable-sized-type-not-at-end",
Jack Hee2eeff42016-12-07 18:25:17 -080040 // 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: {
Jakub Pawlowskiba993e92017-02-09 16:46:45 -080049 cflags: [
50 "-DBLUEDROID_DEBUG",
Jakub Pawlowskiba993e92017-02-09 16:46:45 -080051 ],
Jack Hee2eeff42016-12-07 18:25:17 -080052 },
53 },
Jack Hee2eeff42016-12-07 18:25:17 -080054}
Jakub Pawlowskib707f442017-07-03 15:39:36 -070055
56fluoride_defaults {
57 name: "fluoride_defaults",
Dan Shi02155452018-12-14 09:56:36 -080058 target: {
59 android: {
60 test_config_template: ":BluetoothTestConfigTemplate",
61 }
62 },
Jakub Pawlowskib707f442017-07-03 15:39:36 -070063 defaults: ["fluoride_types_defaults"],
Jakub Pawlowskie56fabc2017-10-19 00:26:09 -070064 header_libs: ["libbluetooth_headers"],
Jack He9d9df722018-12-20 15:46:17 -080065 shared_libs: ["libstatslog"],
Jakub Pawlowskib707f442017-07-03 15:39:36 -070066 static_libs: [
67 "libbluetooth-types",
Jack He9d9df722018-12-20 15:46:17 -080068 "libbt-platform-protos-lite",
Jakub Pawlowskib707f442017-07-03 15:39:36 -070069 ],
Ajay Panicker96bcf142018-09-17 11:35:24 -070070 cpp_std: "c++17",
Ivan Lozanobe596a82018-09-28 11:23:51 -070071 sanitize: {
72 misc_undefined: ["bounds"],
73 },
Jakub Pawlowskib707f442017-07-03 15:39:36 -070074}
Ajay Panickerff48ce82018-09-20 14:39:00 -070075
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: {
Hansong Zhang262bff92019-03-27 15:49:13 -070082 host: {
Ajay Panickerff48ce82018-09-20 14:39:00 -070083 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: {
Hansong Zhang262bff92019-03-27 15:49:13 -0700100 host: {
Ajay Panickerff48ce82018-09-20 14:39:00 -0700101 ldflags: [
102 "-fprofile-instr-generate",
103 "-fcoverage-mapping",
104 ],
105 },
106 },
107}