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