Alexei Frolov | 1a82c14 | 2019-10-31 17:37:12 -0700 | [diff] [blame^] | 1 | # Copyright 2019 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 | |
| 15 | import("modules.gni") |
| 16 | |
| 17 | # Default configs to use for all binary build targets. |
| 18 | _default_common_binary_configs = [ |
| 19 | "$dir_pw_build:reduced_size", |
| 20 | "$dir_pw_build:strict_warnings", |
| 21 | ] |
| 22 | |
| 23 | set_defaults("executable") { |
| 24 | configs = _default_common_binary_configs |
| 25 | } |
| 26 | |
| 27 | set_defaults("static_library") { |
| 28 | configs = _default_common_binary_configs |
| 29 | } |
| 30 | |
| 31 | set_defaults("shared_library") { |
| 32 | configs = _default_common_binary_configs |
| 33 | } |
| 34 | |
| 35 | set_defaults("source_set") { |
| 36 | configs = _default_common_binary_configs |
| 37 | } |
| 38 | |
| 39 | declare_args() { |
| 40 | # The name of the GN template used to build Pigweed executables. |
| 41 | pw_executable_target_type = "executable" |
| 42 | |
| 43 | # Path to the .gni file in which the pw_executable_target_type template is |
| 44 | # defined. Empty string if using a GN primitive. |
| 45 | pw_executable_target_path = "" |
| 46 | } |
| 47 | |
| 48 | set_default_toolchain("$dir_pw_toolchain:arm_gcc_cortex_m4_og") |