| # 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") |
| |
| import("$dir_pw_android_toolchain/android.gni") |
| import("$dir_pw_log/backend.gni") |
| import("$dir_pw_sys_io/backend.gni") |
| |
| if (pw_android_toolchain_NDK_PATH != "") { |
| import("$dir_pw_android_toolchain/generate_toolchain.gni") |
| import("$dir_pw_android_toolchain/toolchains.gni") |
| |
| _target_config = { |
| # Configuration options for Pigweed executable targets. |
| pw_build_EXECUTABLE_TARGET_TYPE = "executable" |
| |
| # Facade backends |
| pw_assert_BACKEND = dir_pw_assert_basic |
| pw_log_BACKEND = dir_pw_log_basic |
| pw_sys_io_BACKEND = dir_pw_sys_io_stdio |
| |
| pw_build_LINK_DEPS = [] |
| pw_build_LINK_DEPS += [ |
| "$dir_pw_assert:impl", |
| "$dir_pw_log:impl", |
| ] |
| } |
| |
| _toolchain_properties = { |
| } |
| |
| _target_default_configs = [] |
| |
| pw_target_toolchain_android = { |
| _excluded_members = [ |
| "defaults", |
| "name", |
| ] |
| |
| debug = { |
| name = "android_debug" |
| _toolchain_base = pw_toolchain_android.debug |
| forward_variables_from(_toolchain_base, "*", _excluded_members) |
| forward_variables_from(_toolchain_properties, "*") |
| defaults = { |
| forward_variables_from(_toolchain_base.defaults, "*") |
| forward_variables_from(_target_config, "*") |
| default_configs += _target_default_configs |
| } |
| } |
| |
| speed_optimized = { |
| name = "android_speed_optimized" |
| _toolchain_base = pw_toolchain_android.speed_optimized |
| forward_variables_from(_toolchain_base, "*", _excluded_members) |
| forward_variables_from(_toolchain_properties, "*") |
| defaults = { |
| forward_variables_from(_toolchain_base.defaults, "*") |
| forward_variables_from(_target_config, "*") |
| default_configs += _target_default_configs |
| } |
| } |
| |
| size_optimized = { |
| name = "android_size_optimized" |
| _toolchain_base = pw_toolchain_android.size_optimized |
| forward_variables_from(_toolchain_base, "*", _excluded_members) |
| forward_variables_from(_toolchain_properties, "*") |
| defaults = { |
| forward_variables_from(_toolchain_base.defaults, "*") |
| forward_variables_from(_target_config, "*") |
| default_configs += _target_default_configs |
| } |
| } |
| } |
| |
| # 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_target_toolchain_android_list = [ |
| pw_target_toolchain_android.debug, |
| pw_target_toolchain_android.speed_optimized, |
| pw_target_toolchain_android.size_optimized, |
| ] |
| } |