Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Allow building without mstpm #422

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

AdamCDunlap
Copy link
Contributor

The svsm crate allows the libmstpm dependency to be optional, but since it's a default feature there's no actual way to use make to compile it that disables the feature. Add the necessary parts so that it can be compiled out. This allows running FEATURES='""' make to not build the mstpm.

If there's an existing or better way to do this, please let me know!

Copy link
Member

@cclaudio cclaudio left a comment

Choose a reason for hiding this comment

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

I have only one comment, but other than that it looks good to me.

Makefile Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
Remove the default dependency from "kernel" on mstpm so it can be
compiled without it. Change the Makefile to specify mstpm as feature by
default. This allows running FEATURES='""' make to not build the mstpm.

To run unit tests without testing mstpm, use:

FEATURES_TEST='""' SVSM_ARGS_TEST='--exclude libmstpm' make test

Signed-off-by: Adam Dunlap <acdunlap@google.com>
@joergroedel joergroedel merged commit aa4936a into coconut-svsm:main Aug 16, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants