mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-20 13:51:05 +00:00
aa00a15beb
The default Pigweed pw_toolchain defines the `ar`, `cc`, and `cxx` tools in the base toolchain definition, and builds more customization on top. For Android, since those paths are defined based on build args and toolchain defaults such as `current_cpu` and `api_level`, instead provide "pw_generate_android_toolchain" that defines them last before calling "generate_toolchain". Otherwise arrange matters such that defining Android targets feels as close to the other Pigweed targets as possible. Change-Id: Ic28b62f18c2600cea9c9890389672604e9741773 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55340 Commit-Queue: Scott James Remnant <keybuk@google.com> Reviewed-by: Anthony DiGirolamo <tonymd@google.com>
53 lines
1.7 KiB
Plaintext
53 lines
1.7 KiB
Plaintext
# Copyright 2021 The Pigweed Authors
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
# use this file except in compliance with the License. You may obtain a copy of
|
|
# the License at
|
|
#
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations under
|
|
# the License.
|
|
|
|
import("//build_overrides/pigweed.gni")
|
|
|
|
# Common configs shared by all Android toolchains.
|
|
_android = [ "$dir_pw_android_toolchain:static_libstdc" ]
|
|
|
|
# Describe base Android toolchains.
|
|
pw_toolchain_android = {
|
|
debug = {
|
|
name = "android_debug"
|
|
defaults = {
|
|
default_configs = _android + [ "$dir_pw_build:optimize_debugging" ]
|
|
remove_default_configs = [ "$dir_pw_build:relative_paths" ]
|
|
}
|
|
}
|
|
speed_optimized = {
|
|
name = "android_speed_optimized"
|
|
defaults = {
|
|
default_configs = _android + [ "$dir_pw_build:optimize_speed" ]
|
|
remove_default_configs = [ "$dir_pw_build:relative_paths" ]
|
|
}
|
|
}
|
|
size_optimized = {
|
|
name = "android_size_optimized"
|
|
defaults = {
|
|
default_configs = _android + [ "$dir_pw_build:optimize_size" ]
|
|
remove_default_configs = [ "$dir_pw_build:relative_paths" ]
|
|
}
|
|
}
|
|
}
|
|
|
|
# This list just contains the members of the above scope for convenience to make
|
|
# it trivial to generate all the toolchains in this file via a
|
|
# `pw_generate_android_toolchains` target.
|
|
pw_toolchain_android_list = [
|
|
pw_toolchain_android.debug,
|
|
pw_toolchain_android.speed_optimized,
|
|
pw_toolchain_android.size_optimized,
|
|
]
|