Alexei Frolov | e899dcf | 2019-11-13 14:49:14 -0800 | [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 | # This file defines default values for all of the build variables used by |
| 16 | # Pigweed. |
| 17 | # |
| 18 | # Each individual variable can be overriden by a target to configure the system |
| 19 | # to build for it. This is done in a .gni file specific to the target by first |
| 20 | # importing this file, then changing the variables as desired. |
| 21 | |
Alexei Frolov | 76b0545 | 2019-12-11 14:10:37 -0800 | [diff] [blame] | 22 | # Whether to build host-side tooling. |
| 23 | pw_build_host_tools = true |
| 24 | |
Alexei Frolov | e899dcf | 2019-11-13 14:49:14 -0800 | [diff] [blame] | 25 | # Options which configure the executable targets created in Pigweed builds. |
| 26 | pw_executable_config = { |
| 27 | # The name of the GN target type used to build Pigweed executables. |
| 28 | # |
| 29 | # If this is a custom template, the .gni file containing the template must |
Armando Montanez | a69244e | 2019-11-15 11:25:10 -0800 | [diff] [blame] | 30 | # be imported at the top of the target configuration file to make it globally |
| 31 | # available. |
Alexei Frolov | e899dcf | 2019-11-13 14:49:14 -0800 | [diff] [blame] | 32 | target_type = "executable" |
| 33 | |
| 34 | # Path to an instantiation of the "linker_script" GN template defining the |
| 35 | # linker script configuration for the target. |
| 36 | linker_script_target = "" |
| 37 | |
| 38 | # Path to the Bloaty configuration file that defines the memory layout and |
| 39 | # capacities for the target binaries. |
| 40 | bloaty_config_file = "" |
| 41 | } |
| 42 | |
| 43 | # Default toolchain for the build target. |
| 44 | # |
| 45 | # If this is changed, you must run `ninja -t clean` to remove any files from |
| 46 | # the previous toolchain's build before building again. |
| 47 | pw_target_toolchain = "" |
| 48 | |
| 49 | # Implementation of a main function for "pw_test" unit test binaries. |
| 50 | pw_unit_test_main = "$dir_pw_unit_test:main" |
Wyatt Hepler | 09517ed | 2019-11-14 12:43:26 -0800 | [diff] [blame] | 51 | |
Alexei Frolov | 8403f0a | 2019-11-20 13:57:54 -0800 | [diff] [blame] | 52 | # Path to a test runner to automatically run unit tests after they are built. |
Wyatt Hepler | 09517ed | 2019-11-14 12:43:26 -0800 | [diff] [blame] | 53 | # |
Alexei Frolov | 8403f0a | 2019-11-20 13:57:54 -0800 | [diff] [blame] | 54 | # If set, the pw_test() template creates an action that invokes the test runner |
| 55 | # on each test executable. If unset, the pw_test() template only creates a test |
| 56 | # executable target. |
Wyatt Hepler | 09517ed | 2019-11-14 12:43:26 -0800 | [diff] [blame] | 57 | # |
Alexei Frolov | 8403f0a | 2019-11-20 13:57:54 -0800 | [diff] [blame] | 58 | # This should only be enabled for targets which support parallelized running of |
| 59 | # unit tests, such as desktops with multiple cores. |
| 60 | pw_automatic_test_runner = "" |
Armando Montanez | 68de071 | 2019-11-14 18:29:39 -0800 | [diff] [blame] | 61 | |
Alexei Frolov | 942adf0 | 2019-12-11 17:07:28 -0800 | [diff] [blame] | 62 | # Languages for which to generate protobuf code. These are used by the |
| 63 | # pw_proto_library template to determine which build targets to create. |
| 64 | # |
| 65 | # Supported languages: |
| 66 | # "cc" |
| 67 | pw_protobuf_langs = [ "cc" ] |
| 68 | |
Armando Montanez | 68de071 | 2019-11-14 18:29:39 -0800 | [diff] [blame] | 69 | ################################# BACKENDS ##################################### |
| 70 | |
Alexei Frolov | 8403f0a | 2019-11-20 13:57:54 -0800 | [diff] [blame] | 71 | # This section of the file defines empty variables for each of the Pigweed |
Armando Montanez | 68de071 | 2019-11-14 18:29:39 -0800 | [diff] [blame] | 72 | # facades that expect a backend. This allows minimal breakages when adding new |
| 73 | # facades. Instead of GN always halting due to encountering an undefined |
| 74 | # variable, GN will only emit an error if something in the build depends on the |
| 75 | # empty (but defined) variable. |
| 76 | # |
| 77 | # All of these should default to empty strings. For target-specific defaults, |
| 78 | # modify these variables in a target confiruation file. |
| 79 | |
Armando Montanez | 04c56ae | 2019-12-12 14:34:05 -0800 | [diff] [blame] | 80 | # Backend for the pw_dumb_io module. |
Armando Montanez | 68de071 | 2019-11-14 18:29:39 -0800 | [diff] [blame] | 81 | dir_pw_dumb_io_backend = "" |
Armando Montanez | 5104cd6 | 2019-12-10 14:36:43 -0800 | [diff] [blame] | 82 | |
| 83 | # Backend for the pw_cpu_exception module. |
| 84 | dir_pw_cpu_exception_backend = "" |