Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BaseTools: Add Cargo Feature support for build (#682)
## Description Adds build support for setting cargo features via EDKII Feature Pcds. Adds a new makefile variable, CARGO_FEATURES [a comma separated list] that is generated per module based on any FeaturePcds in the INF that are enabled. any build rule can consume this makefile variable. Updates the build rules for building rust crates to consume this variable. Updates cargo make's config to pass the variable to the underlying build command. **WARNING: Makefile.toml will be updated via mu_devops (microsoft/mu_devops#298 - [ ] Impacts functionality? - **Functionality** - Does the change ultimately impact how firmware functions? - Examples: Add a new library, publish a new PPI, update an algorithm, ... - [ ] Impacts security? - **Security** - Does the change have a direct security impact on an application, flow, or firmware? - Examples: Crypto algorithm change, buffer overflow fix, parameter validation improvement, ... - [x] Breaking change? - **Breaking change** - Will anyone consuming this change experience a break in build or boot behavior? - Examples: Add a new library class, move a module to a different repo, call a function in a new library class in a pre-existing module, ... - [ ] Includes tests? - **Tests** - Does the change include any explicit test code? - Examples: Unit tests, integration tests, robot tests, ... - [ ] Includes documentation? - **Documentation** - Does the change contain explicit documentation additions outside direct code modifications (and comments)? - Examples: Update readme file, add feature readme file, link to documentation on an a separate Web page, ... ## How This Was Tested Created a featurePCD and ensured that the rust feature is passed to cargo. Ensured that when the featurepcd is set to true, the feature is enabled in cargo. Ensured that when the featurepcd is set to false, the feature is not enabled in cargo. ## Integration Instructions Developers will need to complete the following: 1. Remove the temporary Conf file, so that it can be repopulated. 2. Update consuming repository's Makefile.toml from mu_devops.
- Loading branch information