xref: /aosp_15_r20/external/pigweed/pw_android_toolchain/toolchains.gni (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2021 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
15import("//build_overrides/pigweed.gni")
16
17# Common configs shared by all Android toolchains.
18_android = [ "$dir_pw_android_toolchain:static_libstdc" ]
19
20# Describe base Android toolchains.
21pw_toolchain_android = {
22  debug = {
23    name = "android_debug"
24    defaults = {
25      default_configs = _android + [ "$dir_pw_build:optimize_debugging" ]
26    }
27  }
28  speed_optimized = {
29    name = "android_speed_optimized"
30    defaults = {
31      default_configs = _android + [ "$dir_pw_build:optimize_speed" ]
32    }
33  }
34  size_optimized = {
35    name = "android_size_optimized"
36    defaults = {
37      default_configs = _android + [ "$dir_pw_build:optimize_size" ]
38    }
39  }
40}
41
42# This list just contains the members of the above scope for convenience to make
43# it trivial to generate all the toolchains in this file via a
44# `pw_generate_android_toolchains` target.
45pw_toolchain_android_list = [
46  pw_toolchain_android.debug,
47  pw_toolchain_android.speed_optimized,
48  pw_toolchain_android.size_optimized,
49]
50