Skip to content

Commit de9b419

Browse files
rvolosatovsandreeaflorescu
authored andcommitted
Introduce has_sev attribute
Signed-off-by: Roman Volosatovs <[email protected]>
1 parent 2a6e22a commit de9b419

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

build.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
4+
fn main() {
5+
// Define a `has_sev` attribute, which is used for conditional
6+
// execution of SEV-specific tests and examples.
7+
if std::path::Path::new("/dev/sev").exists() {
8+
println!("cargo:rustc-cfg=has_sev");
9+
}
10+
}

0 commit comments

Comments
 (0)