2020-01-09 23:54:39 +00:00
|
|
|
# Copyright 2020 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("$dir_pigweed/pw_vars_default.gni")
|
|
|
|
|
2020-03-04 00:37:11 +00:00
|
|
|
_arm_bloaty_config = "$dir_pw_boot_armv7m/bloaty_config.bloaty"
|
2020-01-09 23:54:39 +00:00
|
|
|
|
2020-03-04 00:37:11 +00:00
|
|
|
# Targets are required to set a default toolchain. Use the Cortex M4 ARM
|
|
|
|
# toolchain for old pw_size_report targets.
|
|
|
|
pw_target_toolchain = "$dir_pw_toolchain:arm_gcc_cortex_m4_og"
|
|
|
|
|
|
|
|
pw_executable_config.bloaty_config_file = _arm_bloaty_config
|
2020-01-09 23:54:39 +00:00
|
|
|
|
|
|
|
# Special upstream build variable to indicate that this is a docs-only target.
|
|
|
|
pw_is_docs_target = true
|
|
|
|
|
|
|
|
# Toolchains to compare in documentation size reports.
|
|
|
|
pw_size_report_toolchains = [
|
|
|
|
{
|
2020-03-04 00:37:11 +00:00
|
|
|
name = "arm-none-eabi-gcc -Og -mcpu=cortex-m4"
|
2020-01-09 23:54:39 +00:00
|
|
|
target = "$dir_pw_toolchain:arm_gcc_cortex_m4_og"
|
2020-03-04 00:37:11 +00:00
|
|
|
bloaty_config = _arm_bloaty_config
|
2020-01-09 23:54:39 +00:00
|
|
|
},
|
|
|
|
{
|
2020-03-04 00:37:11 +00:00
|
|
|
name = "arm-none-eabi-gcc -Os -mcpu=cortex-m4"
|
2020-01-09 23:54:39 +00:00
|
|
|
target = "$dir_pw_toolchain:arm_gcc_cortex_m4_os"
|
2020-03-04 00:37:11 +00:00
|
|
|
bloaty_config = _arm_bloaty_config
|
2020-01-09 23:54:39 +00:00
|
|
|
},
|
|
|
|
{
|
2020-03-04 00:37:11 +00:00
|
|
|
name = "arm-none-eabi-gcc -O2 -mcpu=cortex-m4"
|
2020-01-09 23:54:39 +00:00
|
|
|
target = "$dir_pw_toolchain:arm_gcc_cortex_m4_o2"
|
2020-03-04 00:37:11 +00:00
|
|
|
bloaty_config = _arm_bloaty_config
|
2020-01-09 23:54:39 +00:00
|
|
|
},
|
|
|
|
]
|