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 | |
| 22 | # Options which configure the executable targets created in Pigweed builds. |
| 23 | pw_executable_config = { |
| 24 | # The name of the GN target type used to build Pigweed executables. |
| 25 | # |
| 26 | # 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^] | 27 | # be imported at the top of the target configuration file to make it globally |
| 28 | # available. |
Alexei Frolov | e899dcf | 2019-11-13 14:49:14 -0800 | [diff] [blame] | 29 | target_type = "executable" |
| 30 | |
| 31 | # Path to an instantiation of the "linker_script" GN template defining the |
| 32 | # linker script configuration for the target. |
| 33 | linker_script_target = "" |
| 34 | |
| 35 | # Path to the Bloaty configuration file that defines the memory layout and |
| 36 | # capacities for the target binaries. |
| 37 | bloaty_config_file = "" |
| 38 | } |
| 39 | |
| 40 | # Default toolchain for the build target. |
| 41 | # |
| 42 | # If this is changed, you must run `ninja -t clean` to remove any files from |
| 43 | # the previous toolchain's build before building again. |
| 44 | pw_target_toolchain = "" |
| 45 | |
| 46 | # Implementation of a main function for "pw_test" unit test binaries. |
| 47 | pw_unit_test_main = "$dir_pw_unit_test:main" |
Wyatt Hepler | 09517ed | 2019-11-14 12:43:26 -0800 | [diff] [blame] | 48 | |
| 49 | # Whether GN unit test runner targets should be created. |
| 50 | # |
| 51 | # If set to true, the pw_test() template creates an action that invokes the test |
| 52 | # runner script on each test executable. If false, the pw_test() template only |
| 53 | # creates a test executable target. |
| 54 | # |
| 55 | # This should be enabled for targets which support parallelized running |
| 56 | # of unit tests, such as desktops with multiple cores. |
| 57 | pw_unit_test_create_run_targets = false |
Armando Montanez | 68de071 | 2019-11-14 18:29:39 -0800 | [diff] [blame] | 58 | |
| 59 | ################################# BACKENDS ##################################### |
| 60 | |
| 61 | # This section of the file defines empty variables for each of the pigweed |
| 62 | # facades that expect a backend. This allows minimal breakages when adding new |
| 63 | # facades. Instead of GN always halting due to encountering an undefined |
| 64 | # variable, GN will only emit an error if something in the build depends on the |
| 65 | # empty (but defined) variable. |
| 66 | # |
| 67 | # All of these should default to empty strings. For target-specific defaults, |
| 68 | # modify these variables in a target confiruation file. |
| 69 | |
| 70 | # Declare dir_pw_dumb_io_backend |
| 71 | dir_pw_dumb_io_backend = "" |