xref: /aosp_15_r20/external/pigweed/pw_build_android/Android.bp (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1// Copyright 2024 The Pigweed Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may not
4// use this file except in compliance with the License. You may obtain a copy of
5// the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12// License for the specific language governing permissions and limitations under
13// the License.
14
15package {
16    default_applicable_licenses: ["external_pigweed_license"],
17}
18
19// List of Common Android backends and build flags used by Pigweed modules.
20// Do not modify this to swap a different backend. Instead see the
21// pw_build_android documentation for how to use custom backends.
22cc_defaults {
23    name: "pw_android_common_backends",
24    cpp_std: "c++20",
25
26    // Note for maintainers:
27    // Update the build flags in the documentation when updating this list.
28    cflags: [
29        // Allow `pw::Function`s to exceed the inline size. This assumes all
30        // targets built with this backend can use dynamic allocation.
31        "-DPW_FUNCTION_ENABLE_DYNAMIC_ALLOCATION=1",
32    ],
33
34    // Note for maintainers:
35    // Update the common backends list in the documentation when updating this
36    // list.
37    static_libs: [
38        "pw_assert_log",
39        "pw_chrono_stl",
40        "pw_log_android",
41        "pw_sync_stl",
42        "pw_thread_stl",
43    ],
44    export_static_lib_headers: [
45        "pw_assert_log",
46        "pw_chrono_stl",
47        "pw_log_android",
48        "pw_sync_stl",
49        "pw_thread_stl",
50    ],
51    shared_libs: [
52        "liblog",
53    ],
54}
55