-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add matter_enable_recommended meta-setting (#34942)
* Add matter_enable_recommended meta-setting This setting defaults to true which leaves current behavior unchanged. However it can be set to false to achieve a more conservative / minimal set of defaults, without having to manually disable an ever-increasing set of features. Consider using this setting as the default value for other settings that increase code size or add debugging / tracing or similar features that are not always desired. Especially settings that default to true on Linux and Mac ("because you're probably building for development") should likely use this option for their default, e.g. matter_foo = matter_enable_recommended && (current_os == "linux" || current_os == "mac") * Add more documentation and turn off the setting for minimal CI builds * Move matter_enable_recommended into /config/recommended.gni This allows it to be uesd from args.gni (i.e. in the context of a default_args scope, where variables like current_os are not defined) as well as within a build / toolchain context.
- Loading branch information
1 parent
fa105e6
commit 5592984
Showing
6 changed files
with
57 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright (c) 2024 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
declare_args() { | ||
# Note for SDK developers: As additional features with their own settings | ||
# are added to the SDK, consider using the `matter_enable_recommended` | ||
# meta-setting instead of a default value of 'true', especially where a | ||
# different default is used based on platform (current_os): Often various | ||
# debugging features have previously been defaulted to on for Linux and/or | ||
# Mac but off for embedded platforms (on the assumption that Linux / Mac | ||
# don't have resource constraints?); build settings of that nature should | ||
# instead reference this meta-setting. E.g. | ||
# enable_flux_capacitor = matter_enable_recommended && current_os == "linux" | ||
|
||
# Enable recommended settings by default. This is a meta-setting | ||
# that is enabled by default, and acts as a default for various | ||
# other settings. Setting it to false produces a more conservative / | ||
# minimal set of defaults. | ||
matter_enable_recommended = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters