File: build.rs

package info (click to toggle)
rust-kvm-ioctls 0.21.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 960 kB
  • sloc: makefile: 2
file content (12 lines) | stat: -rw-r--r-- 455 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
// Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

fn main() {
    // Add `has_sev` to expected attributes.
    println!("cargo:rustc-check-cfg=cfg(has_sev)");
    // Define a `has_sev` attribute, which is used for conditional
    // execution of SEV-specific tests and examples.
    if std::path::Path::new("/dev/sev").exists() {
        println!("cargo:rustc-cfg=has_sev");
    }
}