1# Copyright 2020 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 17import("$dir_pw_build/defaults.gni") 18 19# Specifies the tools used by host GCC toolchains. 20_host_gcc_toolchain = { 21 ar = "ar" 22 cc = "gcc" 23 cxx = "g++" 24 25 is_host_toolchain = true 26} 27 28# Common configs shared by all host GCC toolchains. 29_configs = [ 30 "$dir_pw_toolchain/host_gcc:disable_psabi_warning", 31 "$dir_pw_toolchain/host_gcc:mingw_z_format", 32] 33 34pw_toolchain_host_gcc = { 35 debug = { 36 name = "host_gcc_debug" 37 forward_variables_from(_host_gcc_toolchain, "*") 38 defaults = { 39 default_configs = pigweed_default_configs + _configs + 40 [ "$dir_pw_build:optimize_debugging" ] 41 } 42 } 43 44 speed_optimized = { 45 name = "host_gcc_speed_optimized" 46 forward_variables_from(_host_gcc_toolchain, "*") 47 defaults = { 48 default_configs = pigweed_default_configs + _configs + 49 [ "$dir_pw_build:optimize_speed" ] 50 } 51 } 52 53 size_optimized = { 54 name = "host_gcc_size_optimized" 55 forward_variables_from(_host_gcc_toolchain, "*") 56 defaults = { 57 default_configs = 58 pigweed_default_configs + _configs + [ "$dir_pw_build:optimize_size" ] 59 } 60 } 61} 62 63# Describes host Linux GCC toolchains. 64pw_toolchain_host_gcc_list = [ 65 pw_toolchain_host_gcc.debug, 66 pw_toolchain_host_gcc.speed_optimized, 67 pw_toolchain_host_gcc.size_optimized, 68] 69