Skip to content

Conversation

@gilles-peskine-arm
Copy link
Contributor

New module config_macros.py, replacing config_history.py. Needed for Mbed-TLS/TF-PSA-Crypto#619 and Mbed-TLS/mbedtls#10548

Don't delete config_history.py yet to facilitate the transition.

PR checklist

Load the list of C preprocessor macros that are options in the configuration
file (`mbedtls/mbedtls_config.h` or `psa/crypto_config.h`), and the list of
C preprocessor macros that are defined in `*adjust*.h` but are not public
options (derived internal macros).

The new module `config_macros` supports both querying the current tree and
querying historical data saved by `save_config_macros.sh`, with the same
query interface. The part that queries historical data subsumes the
`config_history` module.

Signed-off-by: Gilles Peskine <[email protected]>
@gilles-peskine-arm gilles-peskine-arm added bug Something isn't working priority-high High priority - will be reviewed soon labels Dec 23, 2025
@gilles-peskine-arm gilles-peskine-arm added size-xs Estimated task size: extra small (a few hours at most) needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Dec 23, 2025
"""
self._root = build_tree.guess_project_root()
self._submodule = submodule
public = self._search_files(self._PUBLIC_CONFIG_HEADERS)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading the current config file is a problem: if the person who is building the library has edited the config file, then anything that is there will be considered a public option. But the reason this module was created is to serve generate_config_checks.py, which wants to know what is officially a public option, and wants to reject invalid options in the actual config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review priority-high High priority - will be reviewed soon size-xs Estimated task size: extra small (a few hours at most)

Projects

Development

Successfully merging this pull request may close these issues.

1 participant