1package {
2    default_visibility: [":__subpackages__"],
3    default_applicable_licenses: ["system_bt_license"],
4}
5
6// Added automatically by a large-scale-change that took the approach of
7// 'apply every license found to every target'. While this makes sure we respect
8// every license restriction, it may not be entirely correct.
9//
10// e.g. GPL in an MIT project might only apply to the contrib/ directory.
11//
12// Please consider splitting the single license below into multiple licenses,
13// taking care not to lose any license_kind information, and overriding the
14// default license using the 'licenses: [...]' property on targets as needed.
15//
16// For unused files, consider creating a 'fileGroup' with "//visibility:private"
17// to attach the license to, and including a comment whether the files may be
18// used in the current project.
19// See: http://go/android-license-faq
20license {
21    name: "system_bt_license",
22    visibility: [":__subpackages__"],
23    license_kinds: [
24        "SPDX-license-identifier-Apache-2.0",
25        "SPDX-license-identifier-BSD",
26        "SPDX-license-identifier-MIT",
27        "legacy_unencumbered",
28    ],
29    license_text: [
30        "NOTICE",
31    ],
32}
33
34filegroup {
35    name: "BluetoothTestConfigTemplate",
36    srcs: [
37        "AndroidTestTemplate.xml",
38    ],
39}
40
41// This default contains properties that should be common to all the cc targets
42// developed by the Bluetooth team.
43//
44// Be careful when adding new properties here:
45//  - The option should not impact negatively any target, for example "-Wno-*"
46//    options should not be added here but instead on every targets needing
47//    them to avoid allowing adding new warnings in targets that didn't contained
48//    them (you can use the bpmodify tool to ease the work of adding this warning
49//    everywhere) and also allows cleaning them one at a time.
50//
51//  - The option should apply to all the c/c++ code developed by the Bluetooth team:
52//    test, tools, fuzzers, etc, not only production targets, if you need to add an option
53//    for a subset of Bluetooth cc targets you should look at the defaults including this
54//    defaults like "fluoride_defaults" and "gd_defaults".
55//
56//  - Try to keep the name as precise as possible to document to the dependent of what
57//    this default contains. This also means that if you add a new option that isn't
58//    documented by the name of this default, rename it.
59//
60//  - Try avoiding adding option that would not fit "future" targets, for exemple dependencies,
61//    even if every modules of Bluetooth depends on a specific dependency it should be left out
62//    from this default to not push it for future targets that might not need it.
63cc_defaults {
64    name: "bluetooth_cflags",
65    cflags: [
66        "-Wall",
67        "-Werror",
68        "-Wextra",
69        // Override global.go that demote the error to a warning
70        "-Werror=format",
71        "-Werror=reorder-init-list",
72    ],
73    c_std: "c99",
74    cpp_std: "c++20",
75}
76